Re: Permission issue with cgroups | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
<domain>
...
<cputune>
<period>100000</period>
<quota>20000</quota>
</cputune>
...
</domain>
Unfortunately, I think virsh does not have tools to change these parameters, as libcgroup does ( cgget and cgset ). However I guess it won't be a problem, I'll try to use the libvirt API.On 05/11/2012 02:42 PM, Antonio Carlos Salzvedel Furtado Junior wrote:Libvirt would like to use a lot more cgroup controllers than just the
> Hello libvirt users,
>
>
> I'm using the cgroup with QEMU guests. At /etc/libvirt/qemu.conf, I have
> the following parameter:
>
> cgroup_controllers = [ "cpu" ]
cpu controller. If you leave the line in qemu.conf commented out,
libvirt will use all possible cgroup controllers, rather than limiting
you to just one.
>Unfortunately, that is not possible. Libvirt MUST manage its own
> 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.
cgroups; you cannot go behind libvirt's back to change the cgroup
settings, or you will confuse libvirt.
What you should really be doing is figuring out what particular reason
you have for modifying the cgroups, and then determining which libvirt
API will let you modify the domain XML in such a way as to get that
cgroup attribute automatically changed. Since non-root users can
connect to libvirtd to use libvirt's API in order to affect the cgroup
settings, then you do not need anyone other than libvirtd to access the
particular cgroups created for VMs managed by libvirt.
In particular, changes to cpu.shares are done via the libvirt API
> 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.
virDomainSetSchedulerParameters, using the parameter name "cpu_shares";
and are reflected into the domain XML under the XPath notation of
/domain/cputune/shares.
http://libvirt.org/formatdomain.html#elementsCPUTuning
--
Eric Blake eblake@xxxxxxxxxx +1-919-301-3266
Libvirt virtualization library http://libvirt.org
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users
[Virt Tools] [Lib OS Info] [Fedora Users] [Fedora Maintainers] [Fedora Desktop] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]