I’ve always been doing it like so:
$ lxc-create -n ... -t centos -- --release ...
But recently I learned that those templates are deprecated. And
distrobuilder is to be used.
The templates that’s left are:
busybox- Not an option for me. I generally need CentOS, Debian, Ubuntu, whatever.
download- I’d like to have OS as close to original as possible. Not sure if that’s the case with pre-built images. What do you say? And I generally use privileged containers if that matters.
local- This one consumes images, one can create with
distrobuilderas I now see. The ones you create with e.g.
distrobuilder build-lxc /usr/share/distrobuilder/centos(creates
oci- This allows to make use of Docker containers. But I generally need just some plain stock Ubuntu, or CentOS. So doesn’t seem to be useful to me at least for now, does it?
build-dir just creates
build-lxc creates archived rootfs (
rootfs.tar.xz) and supposedly config (
meta.tar.xz). Which I can use with
lxc-create -t local.
pack-lxc probably creates
Okay, I now see that I can probably create LXC container with
$ distrobuilder build-lxc /usr/share/distrobuilder/centos $ lxc-create -t local -- --fstree rootfs.tar.xz --metadata meta.tar.xz`
But how do I configure it? I see 2 * 5 configs in
meta.tar.xz. What are the other ways to create LXC container? What needs to be done to be able to
lxc-start LXC container? Let’s leave deprecated templates out of the discussion. I’d like to learn the new way. Thanks in advance.