HostOnNet Blog

virsh error: Unable to create cgroup for x: No such file or directory

Looking for Linux Server Admin or WordPress Expert? We can help.

I have 2 test KVM virtual machine on a server

[root@server70 ~]# virsh list --all
 Id    Name                           State
 -     vm1                            shut off
 -     vm2                            shut off

[root@server70 ~]#

Recently i tried start one of the Virtual Machine, i got following error.

[root@server70 ~]# virsh start vm1
error: Failed to start domain vm1
error: Unable to create cgroup for vm1: No such file or directory

[root@server70 ~]#

After some searching, i found this is due to bug in “systemd”, that deletes cgroup directory that are not associated with any running process. Until the bug get fixed, it can be fixed by restarting libvirtd.

[root@server70 ~]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
[root@server70 ~]# 

After libvirtd restarted, i am able to start Virtual Machine.

[root@server70 ~]# virsh start vm1
Domain vm1 started

[root@server70 ~]# 


The problem was cause by OpneVZ Kernel. Installing CentOS default kernel fixed it. One problem i noticed was

[root@server70 ~]# service cgconfig start
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Device or resource busy
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d      [FAILED]
[root@server70 ~]#

This also got fixed by installing CentOS Kernel.

[root@server70 ~]# service cgconfig status
[root@server70 ~]# 

Posted in Virtualization

One Response to virsh error: Unable to create cgroup for x: No such file or directory

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.