1

On one workstation I have, libvirt has stopped working; it'll no longer start VMs:

$ virsh --connect qemu:///system 'start westerley-pool'
error: Failed to start domain westerley-pool
error: Invalid value '+cpu' for 'cgroup.subtree_control': Invalid argument

This machine is using the cgroupv2 unified hierarchy (which is supposed to be supported as of 4.9.0). Enabled controllers are memory and pids (checked via cat /sys/fs/cgroup/cgroup.subtree_control), so it's not surprising cpu does not work. But the libvirt cgroups documentation says the controller is not mandatory, it just won't be used if not available.

I have tried restarting libvirtd.service, just in case that'd fix it. No change.

The documentation also says I can explicitly set which controllers to use, so I tried setting cgroup_controllers = [ "memory" ] in /etc/libvirt/qemu.conf (it was previously not set). I again restarted libvirtd.service; still does not work.

I didn't see anything in the logs other than a repeat of the above error message.

I'd rather not enable the cpu controller as I believe it has a performance cost, and I don't need it.

OS: Debian testing
libvirt: 5.0.0-3, from Debian.
kernel: 4.19.0-5-amd64, again Debian.

How can I get libvirt working on this machine again?

1

(Updated on June 30) Make /etc/systemd/system/libvirtd.service.d/cpu.conf with its content

[Service]
CPUQuota=10000%

and everything works fine in my environment. This is an upstream bug as recognized and fixed by the upstream developers: https://libvirt.org/git/?p=libvirt.git;a=commit;h=1d49cdcd116186e079db5668893da17f56141652

I submitted a detailed bug report to Debian as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931243 with a patch.

Ryutaroh Matsumoto

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.