On Ubuntu 14.04 Trusty, I had LXC running, but recently I upgraded from 1.0.7 to 1.1.2 as per the instructions here on Launchpad. However, I found that I could not start my containers any more. After stepping through the container startup logs (starting the container with logging output) I could see that it was because the network bridge hadn't been created on startup by /usr/lib/x86_64-linux-gnu/lxc/lxc-net, the network startup script for LXC.

I managed to get the bridge up by following LXC NET fails to create bridge on Ubuntu Server 14.04 | community.flockport.com

However, that still indicated a problem with dnsmasq (no DNS resolution) and lxcbr0 (the default LXC container bridge) not having any NAT rules. The instructions are more of a quick fix to alleviate the symptoms without fixing the problem. I can't ping out of the containers, and it seems to me that the network setup script isn't being run at startup. What can I check next?


The problem, after all that, was that the lxc-net startup script (/usr/lib/x86_64-linux-gnu/lxc/lxc-net) expects to not find the file /var/lock/subsys/lxc-net. It wasn't being removed for some reason. By doing rm /var/lock/subsys/lxc-net, the file was removed and lxc-net startup script ran as expected, creating the network as expected for LXC.

I hope that helps someone in a similar situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.