Ubuntu 16.04 containers don't boot properly after upgrading the host from 20.04 to 22.04

After upgrading the host from Ubuntu 20.04 to 22.04, all Ubuntu 16.04 containers don’t boot properly. They start, but only have the /sbin/init processes running, nothing else:

# ps auxf
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          21  0.2  0.0  51612  3144 pts/1    Ss   20:30   0:00 su -l
root          22  0.6  0.0  21424  3992 pts/1    S    20:30   0:00  \_ -su
root          70  0.0  0.0  37368  3296 pts/1    R+   20:31   0:00      \_ ps auxf
root           1  0.0  0.0  36436  1864 ?        Ss   20:29   0:00 /sbin/init
#

Not sure how to debug this.

1 Like

That’s normal, 22.04 uses cgroup2, 16.04 cannot boot under cgroup2.

There are a number of forum posts covering this issue. Basically your best bet is to force your 22.04 system into cgroup1 mode by setting systemd.unified_hierarchy=false through the kernel command line.

Thanks @stgraber to point me to the solution!
I guess you just wrote the parameter out of your head and guess it should be: unified_cgroup_hierarchy

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

GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false
update-grub
reboot