Hi all,
I’m testing KDE Linux in a virt-manager/QEMU VM and wanted to try my hand at getting Mullvad VPN daemon/GUI running on it with Kapsule instead of sysext. But I was not able to get Kapsule running on my stock KDE linux because of cgroup legacy/hybrid errors.
Command:
kap create mullvad --image kapsule:archlinux
The image cached successfully, but container creation failed:
Creation failed: Failed to run: /usr/lib/incus/incusd forklxc mullvad ...
The Incus/LXC log showed:
Unsupported cgroup layout (hybrid)
Failed to mount cgroups - unsupported cgroup layout
Failed to mount "/sys/fs/cgroup"
Before the workaround, KDE Linux showed cgroup v2:
stat -fc %T /sys/fs/cgroup
# cgroup2fs
But mount | grep cgroup also showed a v1 controller:
cgroup2 on /sys/fs/cgroup type cgroup2 (...)
net_cls on /sys/fs/cgroup/net_cls type cgroup (...)
And /proc/cmdline included:
systemd.legacy_systemd_cgroup_controller=1
I temporarily fixed it by appending these kernel args at the systemd-boot menu:
systemd.unified_cgroup_hierarchy=1 systemd.legacy_systemd_cgroup_controller=0 cgroup_no_v1=all
After that, mount | grep cgroup only showed the cgroup2 mount, and Kapsule worked:
kap rm mullvad
kap create mullvad --image kapsule:archlinux
Result:
✓ Container 'mullvad' created successfully
✓ Container created
Is KDE Linux expected to boot with systemd.legacy_systemd_cgroup_controller=1 right now, or is this likely a VM image/config bug? Since Kapsule is made for KDE Linux, I expected the default image to already use a cgroup layout that Incus/LXC accepts?