I have been using LXD for years on an Ubuntu Budgie 20.04 laptop. I have upgraded to 22.04 and now I cannot start my container. I don’t know if the error is related to the upgrade or not. I have also replaced my SSD by cloning the previous one (dd) and then resizing (gparted). I am not sure if it is relevant.
After the upgrade I had LXD version 4.x (sorry, cannot remember) but then I purged it and did a complete reinstall (snap). Now I have 5.2 (stable). The problem is still the same: containers do not start. There is no error message whatsoever and there is nothing in the log:
root@notebook:~# snap install lxd
lxd 5.2-79c3c3b from Canonical✓ installed
root@notebook:~# lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]: yes
Name of the new storage pool [default=default]: lxd-pool
Name of the storage backend to use (zfs, ceph, btrfs, dir, lvm) [default=zfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none
Would you like the LXD server to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
david@notebook:~$ lxc launch ubuntu:22.04 test
Creating test
Starting test
david@notebook:~$ lxc list
+------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+------+------+-----------+-----------+
| test | STOPPED | | | CONTAINER | 0 |
+------+---------+------+------+-----------+-----------+
david@notebook:~$ lxc start test --verbose
david@notebook:~$ lxc info --show-log test
Name: test
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2022/06/27 20:02 AEST
Last Used: 2022/06/27 20:04 AEST
Log:
lxc test 20220627100458.843 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc test 20220627100458.843 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
lxc test 20220627100458.844 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc test 20220627100458.844 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
lxc test 20220627100459.234 WARN conf - conf.c:lxc_map_ids:3592 - newuidmap binary is missing
lxc test 20220627100459.234 WARN conf - conf.c:lxc_map_ids:3598 - newgidmap binary is missing
david@notebook:~$
david@notebook:~$ lxc console --show-log test
Console log:
Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted
[!!!!!!] Failed to mount API filesystems.
Exiting PID 1...
By the way, I do not have systemd file or folder in /sys/fs/cgroup/.
I tried to google this new error message but I am stuck. What’s next? Thanks.
I have added the argument to the kernel and now the container started.
What puzzles me though is that I am not running an older container on more modern host systems. As you can see from the above example, I have just installed LXD on Ubuntu 22.04 and I have tried to launch a brand new Ubuntu 22.04 container.
So while now it works, I would still like to understand what the root cause of the problem is. And also, what disadvantage do I have by using CGroupV1 mode?