"Image used by this instance requires CGroupV1 ..." error - manual install vs Ansible

Continuing the discussion from Error: The image used by this instance requires a CGroupV1 host system when using clustering:

I am trying to run a kubernetes cluser with lxd based on this tutorial which uses Ansible. Right at the beginning the playbook (lxd_container) fails due to an LXD error The image used by this instance requires a CGroupV1 host system.

I stumbled over the linked topic here but see an inexplicable issue in my scenario.

So the error "The image used by this instance requires a CGroupV1 host system" appears when I try going through the Ansible playbook (I changed just the image to images:almalinux/8/amd64). When I run something like lxc launch images:/almalinux/8/amd64 alma8 it works as expected.

I tried this with some variations (almalinux/rockylinux/centos) but the issue (no problem via manual lxc, problem with Ansible playbook) stays the same.


I am running lxd 5.1 installed via pacman on a manjaro host, furthermore …

$ ansible --version
ansible [core 2.12.5]
  config file = /home/usernam/Repositories/k8s@lxc.resources/ansible.cfg
  configured module search path = ['/home/usernam/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/usernam/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0]
  jinja version = 3.0.3
  libyaml = True

any idea how to get around this? I’d prefer to keep Ansible into play here.

Sounds like it’s still using CentOS7, possibly because the container already exists on the system and so isn’t getting re-created as CentOS8 despite your change?