[lxc-users] Network does not start automatically on Debian Jessie and Stretch containers, works fine in Wheezy

Serge Hallyn serge.hallyn at ubuntu.com
Mon Apr 11 14:59:13 UTC 2016

Quoting Anders Andersson (pipatron at gmail.com):
> tl;rd: My debian jesse/stretch containers won't start their network on
> boot, can't figure out why.
> I have a seemingly trivial problem with Debian containers on a Debian
> host, but I can't seem to figure out why it happens so I'm turning to
> the professionals for help.
> I run a Debian Stretch (testing) server for my personal use at home.
> It has been running a Debian Wheezy container for a long time, no
> problems whatsoever, implying that my bridge is correctly set up, and
> the corresponding LXC config for the container:
>  lxc.network.type = veth
>  lxc.network.link = br0
>  lxc.network.flags = up
> Now I want more containers, so I tried creating a Jessie container
> using the following command:
>  lxc-create -t download -n deb8 -- -d debian -a amd64 -r jessie
>  lxc-start -n deb8
> This fails to initialize the network inside the new container.
> To debug this, I tried creating three containers using these identical commands:
>  lxc-create -t download -n deb7 -- -d debian -a amd64 -r wheezy
>  lxc-create -t download -n deb8 -- -d debian -a amd64 -r jessie
>  lxc-create -t download -n deb9 -- -d debian -a amd64 -r stretch

Can you show the process listing in the broken containers?

I'd assume the problem is that systemd is getting stuck due to cgroups
not being sufficiently available.  In which case the answer should be
to install lxcfs, or to run a kernel with cgroup namespaces available.

Which lxc and lxcfs versions do youhave installed?

> Starting them all up, only 'deb7' (wheezy) gets a network address from
> my DHCP server; jessie and stretch don't. If I attach to the broken
> containers and type "service networking start", they happily fire up
> the dhcp client and assigns a network address.
> This indicates that the problem is minor, but because I am not yet
> comfortable with linux containers I have no clue where to start
> debugging this. These downloaded containers do not seem to create any
> of the usual logs (/var/log/{syslog,messages}), "journalctl" just
> shows my host's journal (nothing suspicious there), and starting them
> with --logpriority=debug does not really show me anything. I suppose I
> could attach some of these logs if it helps, but hopefully someone has
> seen this before and can tell me where to start looking.
> // Anders
> _______________________________________________
> 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