why libvirtd fails to create vm with internal error 'cpuacct', 'devices' & 'memory' cgroups controllers must be mounted?

StackOverflow https://stackoverflow.com/questions/18799336

  •  28-06-2022
  •  | 
  •  

To try out LXC on CentOS 6.4 host, I followed the steps in http://wiki.centos.org/HowTos/LXC-on-CentOS6, but it fails with ERROR: internal error 'cpuacct', 'devices' & 'memory' cgroups controllers must be mounted, when install vm using virt-install.

有帮助吗?

解决方案

You need to run /etc/init.d/cgconfig daemon to mount the cgroups controllers.

其他提示

In my case I had to do

cgroup_dirlist=('devices' 'memory' 'cpuacct' 'cpuset' 'cpu')

    for d in "${cgroup_dirlist[@]}"
    do
        if [ -e /dev/cgroup/$d ]
        then
            mount -t cgroup cgroup -o $d /dev/cgroup/$d
        fi
    done

which was buried in my /etc/init.c cgroup init file - but also I had

'cgroup_disable=memory,blkio'

enabled in my /proc/cmdline - so that had to be removed in grub config also

hth

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top