
If you are running Debian as a distribution and you have recently upgraded from lxc2 to lxc3 you might notice that your containers do not start.
For me the error I got right after upgrading was:
$ lxc-ls -f Failed to load config for "container_name"
It turns out this is an easy problem to solve š
Step 1: Upgrade your container’s config
In order to upgrade the config for your containers run the following:
$ lxc-update-config -c "path_to_container_config_file"
If after running this command you list your containers and everything works as expected congratulations you are done!
If at the other hand you are still getting the same error go to step 2
Step 2: Start your container with debug mode
Run the following command to try to get some additional info:
$ lxc-start -n -o debug -l debug
You might find that now you are getting a different error – if you are seeing something like:
$ lxc-ls -f Failed to parse config file "/var/lib/lxc/config" at line "lxc.include = /usr/share/lxc/config/debian.common.conf"
Then during the upgrade one of lxc’s packages was probably missed. If you install it again you will get the debian.common.conf file back and your container will be able to boot up again.
# apt install lxc-templates