Should ubuntu 16 container run in lxd 5.11 / Ubuntu 22?

I run a ubuntu-16 container for a while without issues (lxd 3.x, 4.x).
Now I tried to move that container to a new lxd 5.11 host (Ubuntu 22.04) and have issues with systemd and dhcp. dhcpv4 needs to be run manually and the services seem not to start correctly. I tried to launch a vanilla ububtu-16 and have similar issues:

lxc launch ubuntu:16.04 test

the container does not get an ipv4 and needs to be stoped --force.
Inside the container

lxc shell test
root@test:~# init 0
Couldn't find an alternative telinit implementation to spawn.
systemctl start ssh
Failed to connect to bus: No such file or directory

Any idea if and how this could be resolved or is ubuntu 16 container not expected to work in lxd 5.11?

I also tried to run the container in privileged mode but this does not change the behavior.

Yeah, it’s a known issue with 16.04 containers on modern cgroup2 hosts, see

Thanks @sdeziel for the prompt solution!

instead of unified_hierarchy I set unified_cgroup_hierarchy:

/etc/default/grub.d/cgroup.cfg

GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false
update-grub
reboot

so we should upgrade the old ubuntu-16 container(s) …

1 Like