Bug 1727149 - libvirt fails to use cgroups when booting with the unified hierarchy (v2)
Summary: libvirt fails to use cgroups when booting with the unified hierarchy (v2)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-04 17:11 UTC by Ben Breard
Modified: 2019-07-05 08:00 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-05 08:00:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Breard 2019-07-04 17:11:12 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Append systemd.unified_cgroup_hierarchy=1 to the kernel and boot
2. start a VM with the default settings in /etc/libvirt/qemu.conf

Actual results:

Error starting domain: Invalid value '+cpu' for 'cgroup.subtree_control': Invalid argument

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1420, in startup
    self._backend.create()
  File "/usr/lib64/python3.7/site-packages/libvirt.py", line 1089, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: Invalid value '+cpu' for 'cgroup.subtree_control': Invalid argument


Expected results:
VM should work and libvirt should leverage the v2 controllers.


Additional info:
I know this is early days for supporting this in libvirt, but I wasn't able to find any docs in the repo for how to handle this. I've tried disabling all the controllers in the config file above, and that works as a work around, but I really need cpu & mem working at minimum. What am I doing wrong? thanks!

Comment 1 Peter Krempa 2019-07-04 17:28:34 UTC
The support was added very recently. libvirt-5.5.0 should support cgroups v2. You should be able to install it from the virt-preview repo: https://fedoraproject.org/wiki/Virtualization_Preview_Repository

Comment 2 Ben Breard 2019-07-04 17:56:45 UTC
Ah fantastic. Thanks! Is 5.5 likely to land in F31? That would help us here: https://fedoraproject.org/wiki/Changes/CGroupsV2

I'll close this.

Comment 3 Daniel Berrangé 2019-07-05 08:00:16 UTC
It is already in F31. We're not intending to change it in F30.


Note You need to log in before you can comment on or make changes to this bug.