<youssef.elfathi@orange.com>
2017-Feb-28 15:22 UTC
Re: [libvirt-users] Redhat 7: cgroup CPUACCT controller is not mounted
Thanks Martin to confirm that the issue is due to privilege access. How can I run a domain as non-root and be able to access the cpu information? -----Original Message----- From: Martin Kletzander [mailto:mkletzan@redhat.com] Sent: Tuesday, February 28, 2017 16:18 To: EL FATHI Youssef OBS/OINIS Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] Redhat 7: cgroup CPUACCT controller is not mounted On Mon, Feb 27, 2017 at 01:44:44PM +0000, youssef.elfathi@orange.com wrote:>Hi, > >With a non-root user account, I am launching virtual machines and would like to get CPU stats for each Core (using python API or not) but face the following problem: > >- When I issue the command "virsh --readonly cpu-stats MY_DOMAIN" I got the following error: > >error: Failed to retrieve CPU statistics for domain 'MY_DOMAIN' >error: Requested operation is not valid: cgroup CPUACCT controller is >not mounted >Since you are running the domain in session mode (non-root), libvirtd doesn't have the privileges for creating a mount point for the domain and hence the controller is available to use. So I guess it's just a matter of the error message being ambiguous. _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
Martin Kletzander
2017-Feb-28 18:07 UTC
Re: [libvirt-users] Redhat 7: cgroup CPUACCT controller is not mounted
On Tue, Feb 28, 2017 at 03:22:54PM +0000, youssef.elfathi@orange.com wrote:>Thanks Martin to confirm that the issue is due to privilege access. How can I run a domain as non-root and be able to access the cpu information? >You need to use the system libvirt daemon, so you need to connect to qemu:///system instead of qemu:///session. Good write-up about the differences is here: http://blog.wikichoon.com/2016/01/qemusystem-vs-qemusession.html There are also links to more info.
<youssef.elfathi@orange.com>
2017-Feb-28 22:19 UTC
Re: [libvirt-users] Redhat 7: cgroup CPUACCT controller is not mounted
Thanks Martin, it resolved my issue. I had to adapt my setup to allow the non-root user to use libvirt! -----Original Message----- From: Martin Kletzander [mailto:mkletzan@redhat.com] Sent: mardi 28 février 2017 19:07 To: EL FATHI Youssef OBS/OINIS <youssef.elfathi@orange.com> Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] Redhat 7: cgroup CPUACCT controller is not mounted On Tue, Feb 28, 2017 at 03:22:54PM +0000, youssef.elfathi@orange.com wrote:>Thanks Martin to confirm that the issue is due to privilege access. How can I run a domain as non-root and be able to access the cpu information? >You need to use the system libvirt daemon, so you need to connect to qemu:///system instead of qemu:///session. Good write-up about the differences is here: http://blog.wikichoon.com/2016/01/qemusystem-vs-qemusession.html There are also links to more info. _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
Apparently Analagous Threads
- Re: Redhat 7: cgroup CPUACCT controller is not mounted
- Re: Redhat 7: cgroup CPUACCT controller is not mounted
- Redhat 7: cgroup CPUACCT controller is not mounted
- getCPUStats of a domain by a non-root user - libvirtError: Requested operation is not valid: cgroup CPUACCT controller is not mounted
- libvirt with lxc: internal error The 'cpuacct', 'devices' & 'memory' cgroups controllers must be mounted