[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lxc-create: Network does not start automatically in debian jessie+stretch LXC containers, but works in wheezy.

I'm running LXC on a debian stretch (testing) server, and trying to
create debian containers ("guests") using the lxc-create command.

I have been running a wheezy container successfully for a long time,
so I know for sure that my networking bridge is correctly configured
for use with LXC. The problem is that when I try to create guests with
debian jessie or stretch, they will not start up correctly.

I create three guests with the following commands, all identical
except for the name and release:
 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

My /etc/lxc/default.conf is set up to install the following
configuration in the container's config files:
 lxc.network.type = veth
 lxc.network.link = br0
 lxc.network.flags = up
I have verified that this is indeed inserted into the config files.

When I start these containers, only wheezy gets an IP address from my
DHCP server. Jessie and stretch do not, even though the configuration
is the same in all containers with regards to /etc/network/interfaces

If I enter the jessie/stretch containers with "lxc-attach -n deb8" and
manually type "service networking start", the dhcp client starts up,
happily assigns an IP address from my DHCP server, and everything
works like a charm.

So my problem is: Why doesn't it do this automatically? How could I
find out? The pre-generated containers does not have any relevant logs
(syslog, messages, dmesg, journalctl) because I guess everything is
supposed to be logged by the host, and the host journalctl does not
show anything different between the respective containers when I start

Hoping that anyone has a clue or has experienced this problem and know
how to solve it. I'm starting with the debian mailing list first
because it's a debian+debian problem.

Reply to: