Bug 666130 - Cgroups cause libvirt to be unable to start virtual machines
Summary: Cgroups cause libvirt to be unable to start virtual machines
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 14
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 660402 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-29 03:42 UTC by Scott J Henson
Modified: 2018-04-11 15:09 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-24 21:51:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Scott J Henson 2010-12-29 03:42:46 UTC
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
libvirt-0.8.3-2.fc14.x86_64
shenson@aiden ~$ rpm -qa | grep cgroup
libcgroup-0.36.2-5.fc14.x86_64

How reproducible:

100% reproducible.

Steps to Reproduce:
1. Have cgroup mounted on /cgroup/cpu
2. virsh start vm
  
Actual results:
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

Expected results:
Virtual machine starts as expected.


Additional info:

Comment 1 Matěj Cepl 2011-01-21 10:38:22 UTC
This is a duplicate of bug 660402. Not sure whether this should be closed though.

Comment 2 Cole Robinson 2011-03-23 21:55:59 UTC
*** Bug 660402 has been marked as a duplicate of this bug. ***

Comment 3 Nils Philippsen 2011-04-01 09:05:43 UTC
The same happened to me on an up to date F15(pre) machine. After restarting libvirtd, it worked again.

Comment 4 Adam Williamson 2011-04-05 04:31:19 UTC
yeah, still happening on f15 for me too.

Comment 5 matt 2011-04-10 07:31:11 UTC
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

Comment 6 Nils Philippsen 2011-04-11 10:18:20 UTC
Just for the record, for me it was sufficient to restart libvirtd when I had this issue.

Comment 7 Devan Goodwin 2011-04-22 18:51:40 UTC
Same error, restarting libvirtd also works around the issue for me.

Comment 8 Cole Robinson 2011-04-27 13:01:44 UTC

*** This bug has been marked as a duplicate of bug 678555 ***

Comment 9 Michal Schmidt 2011-04-27 13:11:49 UTC
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.

Comment 10 Scott J Henson 2011-04-27 14:41:34 UTC
I was not using systemd. I was (and am) using a standard F14 install with upstart.

Comment 11 Richard Ryniker 2011-05-19 11:09:28 UTC
F15
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? 
MPLAB
How much RAM should be allocated (in megabytes)? 
4096
What would you like to use as the disk (file path)? 
/home/ryniker/Virt_stor/MPLAB.img 
This will overwrite the existing path '/home/ryniker/Virt_stor/MPLAB.img'
Do you really want to use this disk (yes or no) 
yes
What is the install CD-ROM/ISO or URL? 
Fedora-15-x86_64-DVD.iso

Starting install...
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.

Comment 12 Chuck Ebbert 2011-05-20 13:57:07 UTC
(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?

Comment 13 Scott J Henson 2011-05-20 14:37:17 UTC
(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.

Comment 14 Panormitis Petrou 2011-05-30 09:22:19 UTC
This bug still exists on Fedora 15

Comment 15 Rodney McKee 2011-06-01 00:26:29 UTC
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

Comment 16 Rodney McKee 2011-06-01 03:16:32 UTC
Just applied the current updates and fixed, sorry for the spam

Comment 17 Cole Robinson 2011-07-07 16:58:34 UTC
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:

https://bugzilla.redhat.com/show_bug.cgi?id=678555

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

cat /etc/cgconfig.conf:
mount {
	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?

Comment 18 Fedora Admin XMLRPC Client 2011-09-22 17:59:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 19 Fedora Admin XMLRPC Client 2011-09-22 18:03:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 20 Fedora Admin XMLRPC Client 2011-11-30 19:59:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 21 Fedora Admin XMLRPC Client 2011-11-30 20:00:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 22 Fedora Admin XMLRPC Client 2011-11-30 20:05:20 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 23 Fedora Admin XMLRPC Client 2011-11-30 20:05:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 24 Cole Robinson 2012-01-24 21:51:45 UTC
F14 is EOL, and data wasn't provided anyways. Closing


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