Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem: error: Requested operation is not valid: cgroup memory controller is not mounted
[root@localhost network-scripts]# virsh list
Id Name State
----------------------------------------------------
5 a running
[root@localhost network-scripts]# virsh memtune a
error: Unable to get number of memory parameters
error: Requested operation is not valid: cgroup memory controller is not mounted
[root@localhost network-scripts]# virsh memtune a --hard-limit 512000
error: Unable to change memory parameters
Version-Release number of selected component (plus see additional info)
libvirt-python-0.10.2-29.el6_5.2.x86_64
libvirt-client-0.10.2-29.el6_5.2.x86_64
libvirt-0.10.2-29.el6_5.2.x86_64
How reproducible:
always
Steps to Reproduce:
1. Start a guest
2. Try to apply memtune
Actual results:
error: Unable to change memory parameters
Expected results:
>> virsh # list
>> Id Name State
>> ----------------------------------
>> 4 Fedora_14_x64 running
>>
>> virsh # memtune Fedora_14_x64
>> hard_limit : 9007199254740991
>> soft_limit : 9007199254740991
>> swap_hard_limit: 9007199254740991
Additional info:
Customer faced the issue on RHEL 6.3
libvirt-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:55:54 AM CEST
libvirt-client-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:55:53 AM CEST
libvirt-python-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:56:54 AM CEST
gpxe-roms-qemu-0.9.7-6.9.el6.noarch Wed 15 May 2013 12:10:44 PM CEST
qemu-img-0.12.1.2-2.295.el6_3.2.x86_64 Wed 15 May 2013 10:53:26 AM CEST
qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64 Wed 15 May 2013 12:10:45 PM CEST
I have reproduced it on RHEL 6.4
[root@localhost network-scripts]# rpm -qa | grep libvirt
libvirt-python-0.10.2-29.el6_5.2.x86_64
libvirt-client-0.10.2-29.el6_5.2.x86_64
libvirt-0.10.2-29.el6_5.2.x86_64
[root@localhost network-scripts]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
---
rmcswain noted, that it works for him on 6.5
Ok, so cgroups is mounted which means what likely happened here is that either libvirtd or the VM, or both were started before the cgroups were mounted. Libvirtd only detects cgroup mounts when it starts up. So if you later mount cgroups you must restart libvirtd and any VMs that were running. So if they can confirm that restarting libvirtd + all VMs makes it work, this this is NOTABUG.
Could you turn on libvirt debug logs (see http://wiki.libvirt.org/page/DebugLogs) and run the following commands
# cat /proc/mounts
# service libvirtd restart
and attach the result of the first command and libvirtd.log with debug logs generated by the second command?
OK, so the log does not mention any cgroup controller to be enabled in qemu configuration and indeed looking at /etc/libvirt/qemu.conf:
cgroup_controllers = [ ]
In other words, they explicitly disabled all cgroups for qemu driver...
Description of problem: error: Requested operation is not valid: cgroup memory controller is not mounted [root@localhost network-scripts]# virsh list Id Name State ---------------------------------------------------- 5 a running [root@localhost network-scripts]# virsh memtune a error: Unable to get number of memory parameters error: Requested operation is not valid: cgroup memory controller is not mounted [root@localhost network-scripts]# virsh memtune a --hard-limit 512000 error: Unable to change memory parameters Version-Release number of selected component (plus see additional info) libvirt-python-0.10.2-29.el6_5.2.x86_64 libvirt-client-0.10.2-29.el6_5.2.x86_64 libvirt-0.10.2-29.el6_5.2.x86_64 How reproducible: always Steps to Reproduce: 1. Start a guest 2. Try to apply memtune Actual results: error: Unable to change memory parameters Expected results: >> virsh # list >> Id Name State >> ---------------------------------- >> 4 Fedora_14_x64 running >> >> virsh # memtune Fedora_14_x64 >> hard_limit : 9007199254740991 >> soft_limit : 9007199254740991 >> swap_hard_limit: 9007199254740991 Additional info: Customer faced the issue on RHEL 6.3 libvirt-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:55:54 AM CEST libvirt-client-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:55:53 AM CEST libvirt-python-0.9.10-21.el6_3.4.x86_64 Fri 24 May 2013 10:56:54 AM CEST gpxe-roms-qemu-0.9.7-6.9.el6.noarch Wed 15 May 2013 12:10:44 PM CEST qemu-img-0.12.1.2-2.295.el6_3.2.x86_64 Wed 15 May 2013 10:53:26 AM CEST qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64 Wed 15 May 2013 12:10:45 PM CEST I have reproduced it on RHEL 6.4 [root@localhost network-scripts]# rpm -qa | grep libvirt libvirt-python-0.10.2-29.el6_5.2.x86_64 libvirt-client-0.10.2-29.el6_5.2.x86_64 libvirt-0.10.2-29.el6_5.2.x86_64 [root@localhost network-scripts]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago) --- rmcswain noted, that it works for him on 6.5