Jackie
2015-Sep-08 09:41 UTC
[libvirt-users] How to ifup nic automaticly after hotplug nic for lxc
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 ? Very appreciate for your help. Jackie
Daniel P. Berrange
2015-Sep-08 10:09 UTC
Re: [libvirt-users] How to ifup nic automaticly after hotplug nic for lxc
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 -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Jackie
2015-Sep-09 05:54 UTC
Re: [libvirt-users] How to ifup nic automaticly after hotplug nic for lxc
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
Seemingly Similar Threads
- Re: How to ifup nic automaticly after hotplug nic for lxc
- Re: Hotplug of disk devices in LXC failed with libvirt of version 1.0.2
- Re: Hotplug of disk devices in LXC failed with libvirt of version 1.0.2
- Hotplug of disk devices in LXC failed with libvirt of version 1.0.2
- Re: Hotplug of disk devices in LXC failed with libvirt of version 1.0.2