Re: [libvirt-users] getCPUStats of a domain by a non-root user - libvirtError: Requested operation is not valid: cgroup CPUACCT controller is not mounted

2012-08-17 Thread Anton Beloglazov
Hi Olivier, 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. Best regards, Anton On Fri, Aug 17, 2012 at 11:31 PM, Anton Beloglazov < anton.belogla...@gmail.com> wrote:

Re: [libvirt-users] Live Snapshot and Rebasing using blockpull

2012-08-17 Thread Eric Blake
On 08/17/2012 08:27 AM, Andrew Martin wrote: > > 1. virsh snapshot-create-as to create the snapshot > 2. cp myvm.qcow2 myvm-backup.qcow2 to copy off the now read-only backing > image file > 3. virsh blockpull to merge the base and snapshot images together into a > single image again Yep. As

[libvirt-users] Live Snapshot and Rebasing using blockpull

2012-08-17 Thread Andrew Martin
Hello, I am looking for a solution for live backups of running KVM hosts. I recently read this article which highlights the following method: http://www.linux-kvm.com/content/first-look-virtual-machine-online-disk-snapshots-coming-fedora-18 1. virsh snapshot-create-as to create the snapsh

Re: [libvirt-users] getCPUStats of a domain by a non-root user - libvirtError: Requested operation is not valid: cgroup CPUACCT controller is not mounted

2012-08-17 Thread Anton Beloglazov
Hi Olivier, 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: mount { cpuacct = /mnt/cgroups/cpuacct; } Thanks,

Re: [libvirt-users] getCPUStats of a domain by a non-root user - libvirtError: Requested operation is not valid: cgroup CPUACCT controller is not mounted

2012-08-17 Thread Olivier Doucet
Hi, > libvir: QEMU Driver error : Requested operation is not valid: cgroup CPUACCT > controller is not mounted You need to install/configure Cgroups on your system : http://en.wikipedia.org/wiki/Cgroups https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Manage

Re: [libvirt-users] Where does "cmd" initailize in qemu_command.c?

2012-08-17 Thread Eric Blake
On 08/17/2012 07:02 AM, Eric Blake wrote: > XML or fall back to the default stored in the virCapsPtr caps structure). and the defaults in virCapsPtr were initialized in qemu_driver.c:qemuCreateCapabilities. > Your questions seem to be more of a development nature about the libvirt > source code,

Re: [libvirt-users] Where does "cmd" initailize in qemu_command.c?

2012-08-17 Thread Eric Blake
On 08/16/2012 10:52 AM, He Xin wrote: > > In qemu_command.c, there is a function call "cmd = > virCommandNewArgList(emulator, "-S", NULL);", which initializes pointer > "cmd". However, I don't find the initial value of "cmd->args", which > represents the input of virFindFileInPath in Util.c. Throu

[libvirt-users] Where does "cmd" initailize in qemu_command.c?

2012-08-17 Thread He Xin
Hi, Excuse me, I have a question when I reading the libvirt source codes. I have known the process of how libvirt start/manage qemu, since I need to write a driver based on libvirt. But one thing also confused, please give me some tips. 1. In qemu_command.c, there is

[libvirt-users] Fwd: vm pxe fail

2012-08-17 Thread Alex Jia
- Forwarded Message - From: "Andrew Holway" To: "Alex Jia" Cc: k...@vger.kernel.org Sent: Friday, August 17, 2012 4:24:33 PM Subject: Re: [libvirt-users] vm pxe fail Hello, On Aug 17, 2012, at 4:34 AM, Alex Jia wrote: > Hi Andrew, > I can't confirm a root reason based on your informati

[libvirt-users] getCPUStats of a domain by a non-root user - libvirtError: Requested operation is not valid: cgroup CPUACCT controller is not mounted

2012-08-17 Thread Anton Beloglazov
Hello, I'm trying to use libvirt as a non-root user to obtain statistics on the CPU usage by VMs using the Python API. I'm performing basically the following steps: import libvirt conn = libvirt.openReadOnly(None) dom = conn.lookupByUUIDString('268e38ea-1bc7-41e4-c19e-8eff682e58e4') dom.getCPUSta