[lxc-users] lxc 2.0 => 3.0 and ubuntu.common.conf (and lxc-templates dpkg)

AR Pepper arpepper at uwaterloo.ca
Mon Jul 16 19:40:04 UTC 2018


This message devolved from a different query which is implied here together
with its answer.  Perhaps this result will save some other people some time.


I just discovered a stupid user (lxc administrator) trick.

Suppose you have an lxc setup you are migrating from Ubuntu 16.04 to 18.04.
(Going from lxc 2.0(2.0.8) to 3.0(3.0.1)).
(Doing a fresh install of Ubuntu 18.04 and modifying to match).

If under Ubuntu 18.04 you install the "lxc" package, but not the
"lxc-templates" package, then, even after "lxc-update-config",
some of your lxc config files will fail because of...
(for example)

lxc.include = /usr/share/lxc/config/ubuntu.common.conf


As an even stupider user trick, things seem to superficially work properly
if you simply remove the "ubuntu." from the config file, leaving

lxc.include = /usr/share/lxc/config/common.conf

It turns out /usr/share/lxc/config/ubuntu.common.conf (and many others)
are provided under Ubuntu by the "lxc-templates" package.

Hmm.  Could lxc-update-config (be changed to) remark upon the need for
the lxc-templates package?  Or maybe just make a general observation
that the include file does not exist?  ("Something is wrong")


Adrian Pepper
arpepper at uwaterloo.ca



More information about the lxc-users mailing list