[libvirt-users] Permission issue with cgroups

Antonio Carlos Salzvedel Furtado Junior acsfj08 at inf.ufpr.br
Fri May 11 20:42:02 UTC 2012


Hello libvirt users,


I'm using the cgroup with QEMU guests. At /etc/libvirt/qemu.conf, I have
the following parameter:

cgroup_controllers = [ "cpu" ]

This controller is successfully mounted and  libvirt is able to create
subgroups for each VM, it's really great the cgroups support in libvirt.
The problem is that I can only set the parameters of a given cgroup under
the cpu controller if I'm logged in as root. I want another user to have
that permission as well.

I tried to modify the file /etc/cgconfig.conf to change the permissions.
The file is exactly this:

group libvirt {
        perm {
                admin {
                        uid = opennebula;
                        gid = opennebula;
                }
                task {
                        uid = root;
                        gid = root;
                }
        }
       cpu {
              cpu.shares=512;
       }
}

This configuration above does not seem to modify any of the administration
permissions. Only the root can edit the parameters under libvirt.
The cpu entry was added just to check whether this configuration was read
by cgroups at all. The 'cpu.shares' does change in group libvirt.

I was careful to start libvirt only after the service cgconfig was
restarted.

Thanks in advance,

Antonio Carlos Furtado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120511/6551fe51/attachment.htm>


More information about the libvirt-users mailing list