I had exactly the same problem you described. It’s due to cgroups2, enabled by default on Debian 11.
The solution is to use lxc-unpriv-start
command, which is available in Debian 11, instead of lxc-start
.
Ie, lxc-unpriv-start -n NameOfContainer
. If you haven’t logged in with the user which starts the container you should also execute sudo loginctl enable-linger NameOfUser
before starting a container.
For more info check this link, it’s where I found the solution.
https://unix.stackexchange.com/questions/655898/cannot-start-unprivileged-lxc-containers-on-debian-11-bullseye