user2778685
user2778685

Reputation: 33

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

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.

Upvotes: 3

Views: 1450

Answers (2)

Goblinhack
Goblinhack

Reputation: 3088

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

Upvotes: 0

Manish Sapariya
Manish Sapariya

Reputation: 3605

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

Upvotes: 1

Related Questions