I won't lie -- it's ugly
Go grab the latest 2x source release from github. Be sure you have automake
and libcap-dev
installed before
starting. Be sure you fully delete and 3x stuff if you installed it. This includes shared libraries.
Follow the instructions for building and installing. The catch, here, is that everything is going to be installed and run under
/usr/local
. You may need to run ldconfig
after installation to pick up the shared lib directorues, and
many programs that automate lxc operations will not be expecting stuff to be installed under /usr/local
.
In particular, what used to be /var/lib/lxc
will now be under /usr/local/var/lib/lxc
, so you may need a symlink. We
also had some automation that created templates. That code had to be changed to create them under
/usr/local/shared/lxc/templates
(you could also probably symlink the default directory. You may see other issues.
You will also need to set up systemd units for lxc-net and lxc. The simplest way to do this is to snag these files from annother system running 2.x. You should get:
/lib/systemd/system/lxc.service
/lib/systemd/system/lxc-net.service
/usr/lib/x86_64-linux-gnu/lxc/* # get all of these files
You will need to modify the bindir
var at the top of lxc-containers
to point to /usr/local/bin
You will also need to copy /etc/defaults/lxc
, /etc/defaults/lxc-net
and /etc/lxc
over