提交 7100be40 编写于 作者: C Cédric Bosdonnat

lxc conf2xml: convert ip addresses for hostdev NICs

上级 2811cc61
......@@ -462,6 +462,9 @@ lxcAddNetworkDefinition(lxcNetworkParseData *data)
goto error;
}
hostdev->source.caps.u.net.ips = data->ips;
hostdev->source.caps.u.net.nips = data->nips;
if (VIR_EXPAND_N(data->def->hostdevs, data->def->nhostdevs, 1) < 0)
goto error;
data->def->hostdevs[data->def->nhostdevs - 1] = hostdev;
......
lxc.network.type = phys
lxc.network.link = eth0
lxc.network.name = eth1
lxc.network.ipv4 = 192.168.122.2/24
lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596/64
lxc.rootfs = /var/lib/lxc/migrate_test/rootfs
lxc.utsname = migrate_test
......
......@@ -25,6 +25,8 @@
<source>
<interface>eth0</interface>
</source>
<ip address='192.168.122.2' family='ipv4' prefix='24'/>
<ip address='2003:db8:1:0:214:1234:fe0b:3596' family='ipv6' prefix='64'/>
</hostdev>
</devices>
</domain>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册