LXD 5.0 on Ubuntu 22.04 LTS fails to start 22.04/20.04 containers

I have upgraded a spare i7 laptop w/32GB memory and 2TB SSD to 22.04 LTS (released version)

$ uname -a
Linux w540 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ lxd --version
5.0.0

I created an Ubuntu 22.04 LXD Container (cn1).

$ lxc ls
±---------±-------------±-------±------±------------------±------------------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±---------±-------------±-------±------±------------------±------------------+
| cn1 | STOPPED | | | CONTAINER | 0 |
±--------±--------------±-------±------±------------------±------------------+

$ lxc start cn1
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart cn1 /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/cn1/lxc.conf:
Try lxc info --show-log cn1 for more info

$ lxc info --show-log cn1
Name: cn1
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2022/04/07 17:26 EDT
Last Used: 2022/04/09 10:58 EDT

Log:

lxc cn1 20220409145838.109 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc cn1 20220409145838.109 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
lxc cn1 20220409145838.110 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc cn1 20220409145838.110 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
lxc cn1 20220409145838.203 ERROR cgfsng - cgroups/cgfsng.c:cgfsng_mount:1772 - No such file or directory - Failed to create cgroup at_mnt 24()
lxc cn1 20220409145838.203 ERROR conf - conf.c:lxc_mount_auto_mounts:851 - No such file or directory - Failed to mount "/sys/fs/cgroup"
lxc cn1 20220409145838.203 ERROR conf - conf.c:lxc_setup:4396 - Failed to setup remaining automatic mounts
lxc cn1 20220409145838.203 ERROR start - start.c:do_start:1275 - Failed to setup container "cn1"
lxc cn1 20220409145838.203 ERROR sync - sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 4)
lxc cn1 20220409145838.209 WARN network - network.c:lxc_delete_network_priv:3617 - Failed to rename interface with index 0 from “eth0” to its initial name “vethd28dcbdd”
lxc cn1 20220409145838.209 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:877 - Received container state “ABORTING” instead of "RUNNING"
lxc cn1 20220409145838.209 ERROR start - start.c:__lxc_start:2074 - Failed to spawn container “cn1”
lxc cn1 20220409145838.209 WARN start - start.c:lxc_abort:1039 - No such process - Failed to send SIGKILL via pidfd 19 for process 4181
lxc cn1 20220409145843.315 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc cn1 20220409145843.315 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
lxc 20220409145843.345 ERROR af_unix - af_unix.c:lxc_abstract_unix_recv_fds_iov:218 - Connection reset by peer - Failed to receive response
lxc 20220409145843.345 ERROR commands - commands.c:lxc_cmd_rsp_recv_fds:127 - Failed to receive file descriptors for command "get_state"

So there are multiple errors above? My install was all defaults.

Any ideas whats broken.

thanks.

brian

Hmm, not too sure what’s going on here. I’m running 22.04 on both my desktop and laptop and haven’t seen any such problem.

The error suggests either an issue with /sys/fs/cgroup on the host or missing path in the guest. Can you do ls -lh /sys/fs/cgroup on the host and try creating a container from another image (lxc launch images:alpine/edge a1 for example)?

resolved by completely reinstalling Ubuntu 22.04 and before restoring my 20.04 /home directory I deleted any reference to LXD on the backup then restored that backup /home to my new 22.04 install.

LXD now seems to work.