Unprivileged container not starting

The host os is ubuntu 22 jammy.
The guest os is ubuntu 22 jammy
I can create and start privileged containers.
But have problem with starting unprivileged containers
I created an unprivileged container:

@ubuntu-librem:~$ lxc-ls -f
NAME       STATE   AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED 
ubu-server STOPPED 0         -      -    -    true        

When trying to run it I get errors:

$ lxc-start -n ubu-server 
lxc-start: ubu-server: lxccontainer.c: wait_on_daemonized_start: 877 Received container state "ABORTING" instead of "RUNNING"
lxc-start: ubu-server: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: ubu-server: tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode
lxc-start: ubu-server: tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

the log file has this output

lxc-start ubu-server 20220918222029.943 ERROR    cgfsng - cgroups/cgfsng.c:__cgfsng_delegate_controllers:2953 - Device or resource busy - Could not enable "+memory +pids" controllers in the unified cgroup 11
lxc-start ubu-server 20220918222029.962 ERROR    cgfsng - cgroups/cgfsng.c:__cgfsng_delegate_controllers:2953 - Device or resource busy - Could not enable "+memory +pids" controllers in the unified cgroup 11
lxc-start ubu-server 20220918222029.979 ERROR    start - start.c:print_top_failing_dir:99 - Permission denied - Could not access /home/sherab. Please grant it x access, or add an ACL for the container root
lxc-start ubu-server 20220918222029.979 ERROR    sync - sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 1)
lxc-start ubu-server 20220918222029.980 ERROR    lxccontainer - lxccontainer.c:wait_on_daemonized_start:877 - Received container state "ABORTING" instead of "RUNNING"
lxc-start ubu-server 20220918222029.980 ERROR    lxc_start - tools/lxc_start.c:main:306 - The container failed to start
lxc-start ubu-server 20220918222029.980 ERROR    lxc_start - tools/lxc_start.c:main:309 - To get more details, run the container in foreground mode
lxc-start ubu-server 20220918222029.980 ERROR    start - start.c:__lxc_start:2074 - Failed to spawn container "ubu-server"
lxc-start ubu-server 20220918222029.980 ERROR    lxc_start - tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options

Any advice?

This is the problem.

Try doing chmod +x on that dir.

1 Like

Thank you.
For completness - it was also needed to chmod +x /home/username/.local
and for good measure I also did chmod +x /home/username/.local /share
and for good measure I also did chmod +x /home/username/.local/share/lxc
and it seems to work now.
Again, thank you

1 Like