meta-virtualization/recipes-containers/lxc
Xiangyu Chen 6e69a270b3 lxc: add distrosysconfdir option to make sure the lxc configuration in correct folder
After the commit[1] "meson.build: allow explicit distrosysconfdir", the config of lxc would install
to distrosysconfdir[2], if this value not set, it might set to /etc/sysconfig, that cause lxc-net
configuration cannot be found[3] due to our bb file install the lxc-net to /etc/default folder.

Ref:
[1] 16ebb29dcc
[2] https://github.com/lxc/lxc/blob/main/config/sysconfig/meson.build#L9
[3] https://github.com/lxc/lxc/blob/main/config/sysconfig/lxc.in#L28

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-12-04 21:05:40 +00:00
..
files lxc: templates/lxc-busybox.in: if busybox contains init then use it 2023-03-17 15:41:16 -04:00
lxc_git.bb lxc: add distrosysconfdir option to make sure the lxc configuration in correct folder 2023-12-04 21:05:40 +00:00
README lxc: update to 5.x and meson 2022-08-25 22:55:48 -04:00

install:

Install the following packages to your image:

IMAGE_INSTALL:append = "lxc lxc-networking kernel-modules"

These will put the core lxc application and networking onto your image. No other configuration is required for a basic system.

Note: has only been tested with systemd, sysvinit patches are welcome

Note: Partially conflicts with packages such as k3s, networking will fail to start.

sample test:

% lxc-create -n test -t download -- --server us.lxd.images.canonical.com -d alpine -r 3.16 -a amd64 % lxc-start test % lxc-console test