My service tries to start container with lxc-start, mount command in lxc.hook.mount script fails as
mount failed: Operation not permitted.
This issue has started coming since lxc upgrade from 3.0.3 to 5.0.0 and ubuntu upgrade from 18.04 to 22.04.
cgroupv2 is disabled to keep using v1.
lxc-start DEBUG conf - conf.c:run_buffer:310 - Script exec /mnt/dir/dir-no/script.mount container-2 lxc mount produced output: mount: /mnt/dir/dir-no/uservol: mount failed: Operation not permitted. lxc-start ERROR conf - conf.c:run_buffer:321 - Script exited with status 1 lxc-start ERROR conf - conf.c:lxc_setup:4400 - Failed to run mount hooks
I could not figure out why mount is failing while keeping all other things same.
Any help would be appreciated.