The openrc 0.9.7 adds the cgroup function, but seems it does not work with libvirtd. The procedures to reproduce this issue: 1. start an VM i.e # virsh start GENTOOX64 # virsh list Id Name State ---------------------------------- 1 GENTOOX64 running # virsh shutdown GENTOOX64 # virsh start GENTOOX64 Unable to create cgroup for GENTOOX64: No such file or directory The GENTOOX64 cannot be started. Have below workarounds: 1. restart libvirtd, but everytime the the latest VM is down, need to restart the service again # /etc/init.d/libvirtd restart 2. downgrade openrc to 0.9.4 and optional add below line to /etc/fstab cgroup /sys/fs/cgroup cgroup defaults 0 0 then run "mount -a"
seems the bug looks like the one: https://bugzilla.redhat.com/show_bug.cgi?id=678555 Seems the cgroup-release-agent.sh shouldn't delete the parent directory of the VMs: /sys/fs | +- libvirt | +- qemu | | | +- VM1 | +- VM2
solved. Skip to delete the qemu directory under /sys/fs/cgroup/openrc/libvirt/ $ cat /lib64/rc/sh/cgroup-release-agent.sh #!/bin/sh # # This is run by the kernel after the last task is removed from a # control group in the openrc hierarchy. cgroup=/sys/fs/cgroup/openrc PATH=/bin:/usr/bin:/sbin:/usr/sbin if [ "$1" != "qemu"] ; then if [ -d ${cgroup}/$1 ]; then rmdir ${cgroup}/$1 fi fi
(In reply to comment #0) > The openrc 0.9.7 adds the cgroup function, but seems it does not work with > libvirtd. > I can confirm the problem, but does not agree to the workaround. (In reply to comment #2) > solved. Skip to delete the qemu directory under /sys/fs/cgroup/openrc/libvirt/ > This is 98% correct... the deletion of the directory /sys/fs/cgroup/openrc/libvirt/qemu must be prevented. The following patch works for me: --- /lib/rc/sh/cgroup-release-agent.sh.orig 2011-12-10 13:00:25.000000000 +0100 +++ /lib/rc/sh/cgroup-release-agent.sh 2011-12-28 22:08:32.079939027 +0100 @@ -5,6 +5,6 @@ cgroup=/sys/fs/cgroup/openrc PATH=/bin:/usr/bin:/sbin:/usr/sbin -if [ -d ${cgroup}/$1 ]; then +if [ -d "${cgroup}/$1" -a "$1" != "/libvirt/qemu" ]; then rmdir ${cgroup}/$1 fi
The group settings for openrc have been adjusted to match the kernel's recommendations. Once openrc-0.9.8 isout, please open a new bug if you still have issues.