[lxc-users] Hotplug new network interfaces not working

Stéphane Graber stgraber at ubuntu.com
Tue May 13 16:35:32 UTC 2014


On Tue, May 13, 2014 at 12:29:07PM -0400, Michael H. Warfield wrote:
> On Tue, 2014-05-13 at 12:09 -0400, CDR wrote:
> > Dear Friends
> > I have a Fedora 20 LXC (libirt) container in production and I cannot reboot it.
> > So I used "virsh edit mycontainer" and added several
> > 
> > <interface type='direct'>
> >       <mac address='00:5A:0C:18:C9:E9'/>
> >       <source dev='eth1' mode='bridge'/>
> >     </interface>
> 
> Ok...  But that's libvirt LXC, not LXC-Tools LXC.
> 
> > The problem is that after it gets saved, the new interfaces never show
> > up in ip link, and I have no idea how to make Fedora under LXC to
> > check for the new hardware.
> 
> > Is this a limitation of LXC in general?
> 
> The term "LXC" in this case is ambiguous.  Are you talking about libvirt
> lxc or this project.  They are not the same.
> 
> > I bet there is a workaround.
> 
> Only if you're skilled at creating hotplug and udev rules.  It has to be
> done under the host and the host has to transfer that device into the
> container.  It's not something that's really controllable from the
> container per se.  I can run devices and such in and out of LXC
> containers (NOT libvirt) with some scripting and some rules in the host,
> but I doubt that would help you (I take advantage of some of the
> devtmpfs stuff I wrote for this project).  Libvirt may have a way to
> work around that but you'll have to consult with them.
> 
> I think Stéphane also had some utility for moving devices (interfaces,
> I'm not so sure) but, again, that's for this project, not libvirt.

Correct, lxc-device will let you do that with our LXC.

> 
> > Yours
> > Philip
> 
> 
> -- 
> Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
>    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>    NIC whois: MHW9          | An optimist believes we live in the best of all
>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
> 



> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140513/28882d2b/attachment.sig>


More information about the lxc-users mailing list