On an Ubuntu 21.10 host, run
lxc launch images:78ad7419038a centos7. The container starts, but hangs in /sbin/init. On the console is
cgroup2: Unknown parameter 'mode'
This happened when I did my first dist upgrade of a LXD host. All the containers froze on startup, and wouldn’t get past that.
To get some more debugging, I then set the init to be /bin/bash:
lxc stop --force centos7 lxc config set centos7 raw.lxc 'lxc.init.cmd = /bin/bash' lxc start centos7 --console To detach from the console, press: <ctrl>+a q [root@centos7 /]# exec /sbin/init Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN) Detected virtualization lxc. Detected architecture x86-64. Welcome to CentOS Linux 7 (Core)! Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory Cannot determine cgroup we are running in: No such file or directory Failed to allocate manager object: No such file or directory [!!!!!!] Failed to allocate manager object, freezing.
I also found this ticket - https://github.com/lxc/lxc/issues/4072 - which references a similar problem.
Works fine on 21.04, doesn’t work on 21.10.