[lxc-users] Hotplug new network interfaces not working

Michael H. Warfield mhw at WittsEnd.com
Tue May 13 16:29:07 UTC 2014


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.

> 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!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140513/8c3a5f4e/attachment.sig>


More information about the lxc-users mailing list