Public bug reported: I enabled cgroup for libvirt by: Create a new virt group, by adding group virt { cpu { cpu.shares = 9216; } } into /etc/cgconfig.conf. And add "root:/usr/sbin/libvirtd cpu virt/" into /etc/cgrules.conf So, when I start libvirt-bin, libvirtd will create its own cgroup directory under /mnt/cgroup/cpu/virt/
Everything works well, except after reboot the machine. I found libvirt doesn't create its own cgroup under /mnt/cgroup/cpu, or /mnt/cgroup/sysdefault, instead of /mnt/cgroup/cpu/virt After some tests, the root cause is libvirtd is started earlier than cgred. On lucid, libvirt-bin is started by upstart, while cgred is started by sys-V init script. How can I specify the dependency between the two? Apparently, libvirt-bin should be started after cgred. Right now, I add the following hack in /etc/init/libvirt-bin.conf: pre-start script mkdir -p /var/run/libvirt # Clean up a pidfile that might be left around rm -f /var/run/libvirtd.pid while [ 1 ] do if [ -f /var/run/cgred.pid ] then break else sleep 1 fi done end script Then libvirt works with cgroup again. ** Affects: libvirt (Ubuntu) Importance: Undecided Status: New -- libvirt failed to start vm: internal error Unable to find cgroup for https://bugs.launchpad.net/bugs/577264 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to libvirt in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs