I have 3 LXC containers on my Debian 11 (lxc version 4.0.6).
When the system boots, the first container (first in list under the
/etc/lxc/auto directory) does not start - sometimes. But sometimes it starts as well.
I have set up the log in the config, so I could catch these lines after an unsuccessful start:
lxc vm-mysql ... ERROR cgroup2_devices - cgroups/cgroup2_devices.c:bpf_program_load_kernel:348 - Operation not permitted - Failed to load bpf program: (null) lxc vm-mysql ... ERROR cgroup2_devices - cgroups/cgroup2_devices.c:bpf_program_cgroup_attach:382 - Unknown error -1 - Failed to load bpf program lxc vm-mysql ... ERROR cgfsng - cgroups/cgfsng.c:cgfsng_devices_activate:3024 - Cannot allocate memory - Failed to attach bpf program lxc vm-mysql ... ERROR start - start.c:lxc_spawn:1834 - Failed to setup cgroup2 device controller limits lxc vm-mysql ... ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:859 - Received container state "ABORTING" instead of "RUNNING" lxc vm-mysql ... ERROR start - start.c:__lxc_start:1999 - Failed to spawn container "vm-mysql"
If I log in after the boot, I can start the VM manually, I can’t reproduce this error.
What does it mean? How can I fix it?