[lxc-users] Hotplug new network interfaces not working

CDR venefax at gmail.com
Tue May 13 17:00:25 UTC 2014


I am forced to use libvirt-lxc only because nobody can help me solve
this issue. If somebody can figure this out, then I will only use lXC.
In a Fedora20 container, if I start it with the "-d" flag, then it
never let's me enter the container via the console, it times out on me
when I use
lxc-console -n mycontainer.
This happens only in Fedora 20 containers. But that does not happen
under libvirt. I have 3  different OS' containers, and the other two
work fine under pure LXC.
I think that the bug is in LXC. If I ask Libvirt, they will respond
"it does work, doesn't it?
Any idea?
Philip

On Tue, May 13, 2014 at 12:35 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
> 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
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list