Got it. Thanks
在 2015年09月08日 18:09, Daniel P. Berrange 写道:
On Tue, Sep 08, 2015 at 05:41:14PM +0800, Jackie wrote:
> Hi experts,
>
> When I hotplug nic into lxc, the nic in lxc seemed to be down status as
> following:
>
> 1224: vnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
> link/ether fa:16:3e:fc:e5:96 brd ff:ff:ff:ff:ff:ff
>
>
> It seems mechanism such as udev is needed here. But I found udev is not
> supported well in lxc.
> So how can I get a 'up' nic after hotplug into lxc ?
Correct, there is no udev support in LXC.
In very recent versions of LXC, libvirt will let you define IP address
info in the XML and if that is present, then it will ifup the NIC
for you. If you need DHCP instead of static addressing though, there
is no easy way to address this.
Regards,
Daniel