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

Anders Andersson pipatron at gmail.com
Sat Apr 9 15:13:59 UTC 2016

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

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

More information about the lxc-users mailing list