[Lxc-users] eth0 not coming online in LXC environment

Fajar A. Nugraha list at fajar.net
Fri Apr 5 09:08:34 UTC 2013


On Fri, Apr 5, 2013 at 10:33 AM, David Parks <davidparks21 at yahoo.com> wrote:

> I’ve got an environment set up now where the host OS has a static IP
> directly connected to the LAN. I’m bridging the containers to have their
> own static LAN IP as well.****
>
> **
>


> When I start my container eth0 is **not** configured. If I manually add
> `eth0=eth0` in /run/network/ifstate and `service restart networking`, it
> gets configured properly.****
>
> **
>

** **
>
> After looking at dmesg output I noticed that there are (unexpected)
> references to em1, which is the host’s physical NIC.****
>
> ** **
>
> The bridging all works, networking is fine, it’s just when I start the
> container, rebooting reproduces the problem, then manually updating ifstate
> and rebooting resolves it.****
>
> ** **
>
> I’m not sure how to configure it so it configure eth0 on reboot as I would
> expect.****
>
> **
>

Well, a description on which distro/version you're running as host and
container would be nice.

Short version is if you use Ubuntu (preferably quantal/raring for newer lxc
version, but precise is also fine), then it will just work. If you use some
other combination (e.g. Centos for container), then be prepared for hickups.

I had problems with Centos container, and the "fix" was to force-clean
/var/run and /var/lock/subsys on container startup:
https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in#L90

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130405/104ba1da/attachment.html>


More information about the lxc-users mailing list