Red Hat Bugzilla – Bug 666130
Cgroups cause libvirt to be unable to start virtual machines
Last modified: 2012-01-24 16:51:45 EST
Description of problem:
I have cgroups mounted in order to get a speed up (described in the various linux related media). I am not sure if I modified it myself, or if F14 came like this. I know I did it on my previous F13 install, but don't remember doing it on F14.
Now, when I try to start a virtual machine, I get an error. If I unmount the cgroup mount and restart libvirtd, I can start the virtual machine.
cgroup on /cgroup/cpu type cgroup (rw,cpu)
Version-Release number of selected component (if applicable):
shenson@aiden ~$ rpm -q libvirt
shenson@aiden ~$ rpm -qa | grep cgroup
Steps to Reproduce:
1. Have cgroup mounted on /cgroup/cpu
2. virsh start vm
shenson@aiden ~$ sudo virsh start sb-el5
error: Failed to start domain sb-el5
error: Unable to deny all devices for sb-el5: No such file or directory
Virtual machine starts as expected.
This is a duplicate of bug 660402. Not sure whether this should be closed though.
*** Bug 660402 has been marked as a duplicate of this bug. ***
The same happened to me on an up to date F15(pre) machine. After restarting libvirtd, it worked again.
yeah, still happening on f15 for me too.
I have the same symptoms on F15 upto date as of the time of this entry. The sequence where this happens for me is:
create first new VM
run through to installation complete. At this point it was left for 6 hours.
Reboot the VM (this was a CentOS 5 installation)
I then get the following error ('router' is the VM instance name):
Error starting domain: Unable to create cgroup for router: No such file or directory
unmount as described by Mr. Henson, above, worked around the problem
Just for the record, for me it was sufficient to restart libvirtd when I had this issue.
Same error, restarting libvirtd also works around the issue for me.
*** This bug has been marked as a duplicate of bug 678555 ***
This bug was reported against Fedora 14.
I don't think it is a duplicate of the systemd bug, because F14 does not use systemd (at least not by default).
But even if Scott uses systemd on his F14 system, this F14 bug would not be resolved by an update in F15.
I was not using systemd. I was (and am) using a standard F14 install with upstart.
It appears this can also affect the creation of virtual machines.
The work-around described above in Comment 3 was effective:
# systemctl try-restart libvirtd.service
Sample of failure to create a VM (before libvirtd.service restart):
[root@hp ryniker]# virt-install --prompt
What is the name of your virtual machine?
How much RAM should be allocated (in megabytes)?
What would you like to use as the disk (file path)?
This will overwrite the existing path '/home/ryniker/Virt_stor/MPLAB.img'
Do you really want to use this disk (yes or no)
What is the install CD-ROM/ISO or URL?
ERROR Unable to create cgroup for MPLAB: No such file or directory
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start MPLAB
otherwise, please restart your installation.
(In reply to comment #10)
> I was not using systemd. I was (and am) using a standard F14 install with
And does "service libvirtd restart" fix it on F14?
(In reply to comment #12)
> (In reply to comment #10)
> > I was not using systemd. I was (and am) using a standard F14 install with
> > upstart.
> And does "service libvirtd restart" fix it on F14?
If I unmount the cgroup filesystem and restart libvirtd, things work properly. At which point I can remount the cgroup filesystem and things continue to work till libvirtd restarts.
This bug still exists on Fedora 15
Had no issues under Fedora14, just upgraded to fc15 and get
Error starting domain: Unable to create cgroup for windowsXP: No such file or directory
Just applied the current updates and fixed, sorry for the spam
Anybody seeing cgroup issues on Fedora 15, YOU DO NOT WANT THIS BUG REPORT. The issue you are encountering is a still present systemd bug:
Scott, can you provide an exact set of steps to go from working config to non working config? I can't reproduce this issue. Here's what I'm doing:
service libvirtd stop
service cgconfig stop
cpu = /cgroup/cpu;
service cgconfig start
cat /proc/mounts | grep cgroup:
cgroup /cgroup/cpu cgroup rw,relatime,cpu 0 0
service libvirtd start
virsh start f12-vm:
Domain f12-vm started
Scott, does this affect all your VMs or just some? Can you provide the domain XML of one of the affected domains with 'virsh dumpxml $vmname'? Have you made any configuration changes in /etc/libvirt/qemu.conf? Can you provide the output of /proc/mounts | grep cgroup when reproducing the problem?
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
F14 is EOL, and data wasn't provided anyways. Closing