Hi All,<div><br></div><div>Unfortunately, I couldn't manage to solve my problem.  I've tried various way to configure Cgroups  to enable VM monitoring by a non-root user with no luck. My current /etc/cgconfig.conf is the following:</div>

<div><br></div><div><div>group sysdefault {</div><div>       perm {</div><div>               task {</div><div>                       uid = anton;</div><div>                       gid = root;</div><div>               }</div>

<div>               admin {</div><div>                       uid = anton;</div><div>                       gid = root;</div><div>               }</div><div>       }</div><div>}</div><div><br></div><div>mount {</div><div>
       cpuacct = /mnt/cgroups/cpuacct;</div>
<div>}</div></div><div><br></div><div>Where "anton" is a non-root user. However, this doesn't work. Here is a simple test:</div><div><br></div><div>$ virsh start cirros</div><div>$ virsh cpu-stats cirros</div>

<div><div>error: Failed to virDomainGetCPUStats()</div><div>error: Requested operation is not valid: cgroup CPUACCT controller is not mounted</div></div><div><br></div><div>Where cirros is a VM image. Everything is fine for the root user:</div>

<div><br></div><div>$ sudo virsh start cirros</div><div>$ sudo virsh cpu-stats cirros</div><div><div>CPU0:</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>cpu_time             0.025812184 seconds</div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>vcpu_time            0.025812184 seconds</div><div>CPU1:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cpu_time             4.893484927 seconds</div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>vcpu_time            4.893484927 seconds</div><div>Total:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>cpu_time             4.924620941 seconds</div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>user_time            1.060000000 seconds</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>system_time          3.050000000 seconds</div>

</div><div><br></div><div>I would be very grateful to get any suggestions from anyone.</div><div><br></div><div>Thanks,</div><div>Anton</div><div><br></div><div><br><div class="gmail_quote">On Sat, Aug 18, 2012 at 4:07 PM, Anton Beloglazov <span dir="ltr"><<a href="mailto:anton.beloglazov@gmail.com" target="_blank">anton.beloglazov@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Olivier,<div><br></div><div>Thanks for the links. I see now that there is an option to assign permissions to access control groups for non-root users. I'll try to configure it and post back the results.</div>

<div><br>
</div><div>Best regards,</div><div>Anton<div><div class="h5"><br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 11:31 PM, Anton Beloglazov <span dir="ltr"><<a href="mailto:anton.beloglazov@gmail.com" target="_blank">anton.beloglazov@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Olivier,<div><br>Thanks for the suggestion, but Cgroups is installed and started. As I mentioned, everything works for the root user. Should I do some special configuration for a non-root user? Currently, my /etc/cgconfig.conf contains the following:<br>



<br>mount {<br>     cpuacct = /mnt/cgroups/cpuacct;<br>}<div><br></div><div>Thanks,</div><div>Anton</div><div><div><div><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 11:24 PM, Olivier Doucet <span dir="ltr"><<a href="mailto:webmaster@ajeux.com" target="_blank">webmaster@ajeux.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><br>
> libvir: QEMU Driver error : Requested operation is not valid: cgroup CPUACCT<br>
> controller is not mounted<br>
<br>
</div>You need to install/configure Cgroups on your system :<br>
<a href="http://en.wikipedia.org/wiki/Cgroups" target="_blank">http://en.wikipedia.org/wiki/Cgroups</a><br>
<a href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch01.html" target="_blank">https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch01.html</a><br>




<span><font color="#888888"><br>
Olivier<br>
</font></span></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>