libvirtError: Unable to deny all devices for

While trying to setup a bunch of virtual machines to test some multi-machine configuration I run into this strange error:

libvirtError: Unable to deny all devices for mcc1, no such file or directory

There are some threads on the net for this problem and they all relate to cgroups but I don’t have either cgroups-bin or libpam-cgroups installed. I had however this configured in rc.local:

mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent

Unmount cgroup did not fixed the problem either and a new problem occured: cannot create cgroup for mcc1. Finally after reading the config file I realized the solution was to change the lines in /etc/rc.local as following:

mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu,devices
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent

This solved the problem.

Leave a Reply

*