Re: [libvirt] [PATCH 3/4] qemu: parse and create -cpu ..., -kvmclock

2012-01-24 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 14:11:10 +0100, Paolo Bonzini wrote: Creating part of the -cpu command-line from something other than the cpu XML element introduces some ugliness. Well, that's what we get for creating virtual CPUID features :-) --- src/qemu/qemu_command.c

[libvirt] Re: [PATCH v2 4/4] Allow choice of shutdown method via virsh

2012-01-24 Thread Nicolas Sebrecht
The 23/01/12, Daniel P. Berrange wrote: On Mon, Jan 23, 2012 at 04:41:43PM +0100, Nicolas Sebrecht wrote: The 23/01/12, Michal Privoznik wrote: +By default the hypervisor will try to pick a suitable shutdown +method. To specify an alternative method, the I--mode parameter +can

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-24 Thread Christophe Fergeau
On Mon, Jan 23, 2012 at 11:31:57PM +0200, Zeeshan Ali (Khattak) wrote: On Mon, Jan 23, 2012 at 7:19 PM, Christophe Fergeau cferg...@redhat.com wrote: Based on a patch from Zeeshan Ali (Khattak) zeesha...@gnome.org Looks good! I'll test it later I've only compile-tested it, if it doesn't

Re: [libvirt] libvirt and mingw64 x64, bad idea?

2012-01-24 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 05:20:50PM -0700, Eric Blake wrote: On 01/23/2012 03:29 PM, Marc-André Lureau wrote: Hi, I tried to update the fedora mingw package to follow the mingw64 packaging guideline and allow build for x86 and x64. But I got into build warning and errors for x86_64.

Re: [libvirt] [PATCH v2 2/3] Add test case for virHashEqual function

2012-01-24 Thread Stefan Berger
On 01/24/2012 06:19 AM, Michal Privoznik wrote: Therefore I am pushing this under trivial and build-breaker rules (yeah, one thing - and perhaps the only one - i like about 4.6 gcc is enhanced static analysis as I spotted warning while compiling current HEAD): Author: Michal

Re: [libvirt] [PATCH v2 2/3] Add test case for virHashEqual function

2012-01-24 Thread Michal Privoznik
On 18.01.2012 17:20, Stefan Berger wrote: + +static int +testHashEqual(const void *data ATTRIBUTE_UNUSED) +{ +virHashTablePtr hash1, hash2; +int ret = -1; +char keya[] = a; +char keyb[] = b; +char keyc[] = c; +char value1[] = 1; +char value2[] = 2; +char

Re: [libvirt] [PATCH v2 0/4] Add support for QEMU guest agent control

2012-01-24 Thread Michal Privoznik
On 23.01.2012 15:48, Michal Privoznik wrote: These patches are taken from here: https://www.redhat.com/archives/libvir-list/2011-October/msg00135.html I've just rebased and polished them. The QEMU guest agent /usr/bin/qemu-ga has some handy functions for controlling the guest,

Re: [libvirt] [PATCH v2] Add two NUMA tuning python bindings APIs

2012-01-24 Thread Guan Nan Ren
Thanks for these comments. I will refactor the loop code, rethink about other codes and make v3 patch. Guannan Ren - Original Message - From: Eric Blake ebl...@redhat.com To: Guannan Ren g...@redhat.com Cc: libvir-list@redhat.com Sent: Saturday, January 21, 2012 11:04:15 PM

[libvirt] [PATCH] src/datatypes.h: fix typo

2012-01-24 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- src/datatypes.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index 91b1bfd..47058ed 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -31,7 +31,7 @@ * VIR_CONNECT_MAGIC: * *

Re: [libvirt] [PATCH v2] Add two NUMA tuning python bindings APIs

2012-01-24 Thread Eric Blake
On 01/24/2012 05:07 AM, Guan Nan Ren wrote: static PyObject * +libvirt_virDomainSetNumaParameters(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { +LIBVIRT_BEGIN_ALLOW_THREADS; +i_retval = virDomainGetNumaParameters(domain, params, nparams,

Re: [libvirt] [PATCH] src/datatypes.h: fix typo

2012-01-24 Thread Michal Privoznik
On 24.01.2012 13:45, Alon Levy wrote: Signed-off-by: Alon Levy al...@redhat.com --- src/datatypes.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index 91b1bfd..47058ed 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@

[libvirt] [PATCH v2 1/2] Added RSS information gathering into qemudGetProcessInfo

2012-01-24 Thread Martin Kletzander
One more parameter added into the function parsing /proc/pid/stat and the call of the function is fixed as well. --- v2: - correction of the format in fscanf in qemudGetProcessInfo src/qemu/qemu_driver.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff

Re: [libvirt] [PATCH 1/4] qemu: get arch name from cpu element

2012-01-24 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 17:21:01 +0100, Paolo Bonzini wrote: On 01/23/2012 04:52 PM, Jiri Denemark wrote: I think we could just set cpu-model even if the model used in qemu command line was {qemu,kvm}{32,64}. That would probably mean we need to add some of the models in cpu_map.xml, though.

[libvirt] [PATCH v2 2/2] Added RSS reporting

2012-01-24 Thread Martin Kletzander
Added RSS information gathering into qemuMemoryStats into qemu driver and the reporting into virsh dommemstat. --- v2: - fixed sign for the ret variable (can be negative) include/libvirt/libvirt.h.in |7 ++- src/qemu/qemu_driver.c | 23 ++- tools/virsh.c

Re: [libvirt] [PATCH 1/4] qemu: get arch name from cpu element

2012-01-24 Thread Paolo Bonzini
On 01/24/2012 02:28 PM, Jiri Denemark wrote: The idea is that, if you were using -cpu just to set -cpu {qemu,kvm}{32,64},-kvmclock, you will not get an irrelevant cpumodelqemu32/model/cpu in domxml-from-native output. Yeah, I understand why you did so, however, you just discard

[libvirt] [PATCH][RFC] adding a title to the domain description informations

2012-01-24 Thread Daniel Veillard
The idea is that currently we have only the domain name usable as a description for the domain. It is not really a good human readable identifier, as the kind of string allowed is limited (no space for example). The idea would then be to extend the existing description field in the domain XML to

Re: [libvirt] [PATCH][RFC] adding a title to the domain description informations

2012-01-24 Thread Eric Blake
On 01/24/2012 07:18 AM, Daniel Veillard wrote: The idea is that currently we have only the domain name usable as a description for the domain. It is not really a good human readable identifier, as the kind of string allowed is limited (no space for example). The idea would then be to extend

Re: [libvirt] [PATCH][RFC] adding a title to the domain description informations

2012-01-24 Thread Daniel P. Berrange
On Tue, Jan 24, 2012 at 08:06:31AM -0700, Eric Blake wrote: On 01/24/2012 07:18 AM, Daniel Veillard wrote: The idea is that currently we have only the domain name usable as a description for the domain. It is not really a good human readable identifier, as the kind of string allowed is

[libvirt] [RFC] virCommandProcessIO(): make poll() usage more robust

2012-01-24 Thread Laszlo Ersek
POLLIN and POLLHUP are not mutually exclusive. Currently the following seems possible: the child writes 3K to its stdout or stderr pipe, and immediately closes it. We get POLLIN|POLLHUP (I'm not sure that's possible on Linux, but SUSv4 seems to allow it). We read 1K and throw away the rest. When

Re: [libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

2012-01-24 Thread Federico Simoncelli
- Original Message - From: Jiri Denemark jdene...@redhat.com To: libvir-list@redhat.com Sent: Monday, January 23, 2012 2:30:54 PM Subject: [libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol We already provide ways to detect when a domain has been paused as a

[libvirt] [PATCH 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread Michal Privoznik
These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest. --- src/qemu/qemu_agent.c | 68 + src/qemu/qemu_agent.h |3 ++ 2 files changed, 71 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH 2/3] snapshots: Introduce VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks. --- include/libvirt/libvirt.h.in |4 ++ src/libvirt.c|6 ++ src/qemu/qemu_driver.c | 118 - 3 files changed,

[libvirt] [PATCH 0/3] Use guest agent to quiesce disks

2012-01-24 Thread Michal Privoznik
Since we have qemu guest agent support in libvirt, we can start wiring up some things that GA already knows how to do. One of them is file system freeze and thaw. Domain snapshots can profit from this functionality. Michal Privoznik (3): qemu_agent: Create file system freeze and thaw functions

[libvirt] [PATCH 3/3] virsh: Expose new VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
to cmdSnapshotCreate and cmdSnapshotCreateAs. --- tools/virsh.c |6 ++ tools/virsh.pod | 14 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 5560988..41c 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -14662,6

Re: [libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

2012-01-24 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 11:57:23 -0500, Federico Simoncelli wrote: +/** + * virDomainIoError: + * + * Disk I/O error. + */ +typedef enum { +VIR_DOMAIN_IOERROR_NONE = 0, /* no error */ +VIR_DOMAIN_IOERROR_NO_SPACE = 1, /* no space left on the device */ +

Re: [libvirt] [PATCH 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 18:37:43 +0100, Michal Privoznik wrote: These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest. --- src/qemu/qemu_agent.c | 68 + src/qemu/qemu_agent.h |

Re: [libvirt] [PATCH 6/7] Add support for sVirt in the LXC driver

2012-01-24 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com For the sake of backwards compat, LXC guests are *not* confined by default. This is because it is not practical to dynamically relabel containers using large filesystem trees. Applications can

Re: [libvirt] [PATCH 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread Michal Privoznik
On 24.01.2012 19:21, Jiri Denemark wrote: On Tue, Jan 24, 2012 at 18:37:43 +0100, Michal Privoznik wrote: + +if (qemuAgentCommand(mon, cmd, reply) 0 || +qemuAgentCheckError(cmd, reply) 0) +goto cleanup; + +virJSONValueObjectGetNumberInt(reply, return, ret);

Re: [libvirt] [PATCH 2/3] snapshots: Introduce VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 18:37:44 +0100, Michal Privoznik wrote: With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks. --- include/libvirt/libvirt.h.in |4 ++ src/libvirt.c|6 ++ src/qemu/qemu_driver.c

[libvirt] [PATCH] lxc: export container=lxc-libvirt for systemd

2012-01-24 Thread Eric Blake
Systemd detects containers based on whether they have an environment variable starting with 'container=lxc'; using a longer name fits the expectations, while also allowing detection of who created the container. Requested by Lennart Poettering, in response to

Re: [libvirt] [PATCH 3/3] virsh: Expose new VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 18:37:45 +0100, Michal Privoznik wrote: to cmdSnapshotCreate and cmdSnapshotCreateAs. --- tools/virsh.c |6 ++ tools/virsh.pod | 14 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

Re: [libvirt] [PATCH 3/3] virsh: Expose new VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
On 24.01.2012 19:57, Jiri Denemark wrote: On Tue, Jan 24, 2012 at 18:37:45 +0100, Michal Privoznik wrote: to cmdSnapshotCreate and cmdSnapshotCreateAs. --- tools/virsh.c |6 ++ tools/virsh.pod | 14 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH 2/3] snapshots: Introduce VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
On 24.01.2012 19:49, Jiri Denemark wrote: On Tue, Jan 24, 2012 at 18:37:44 +0100, Michal Privoznik wrote: With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks. --- include/libvirt/libvirt.h.in |4 ++ src/libvirt.c

[libvirt] [PATCH v2 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread Michal Privoznik
These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest. --- src/qemu/qemu_agent.c | 74 + src/qemu/qemu_agent.h |3 ++ 2 files changed, 77 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH v2 0/3] Use guest agent to quiesce disks

2012-01-24 Thread Michal Privoznik
Since we have qemu guest agent support in libvirt, we can start wiring up some things that GA already knows how to do. One of them is file system freeze and thaw. Domain snapshots can profit from this functionality. Michal Privoznik (3): qemu_agent: Create file system freeze and thaw functions

[libvirt] [PATCH v2 2/3] snapshots: Introduce VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks. --- include/libvirt/libvirt.h.in |4 ++ src/libvirt.c|6 +++ src/qemu/qemu_driver.c | 87 ++ 3 files

[libvirt] [PATCH v2 3/3] virsh: Expose new VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

2012-01-24 Thread Michal Privoznik
to cmdSnapshotCreate and cmdSnapshotCreateAs. --- tools/virsh.c |6 ++ tools/virsh.pod | 16 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 5560988..41c 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -14662,6

Re: [libvirt] [PATCH 7/7] Set a security context on /dev and /dev/pts mounts

2012-01-24 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com To allow the container to access /dev and /dev/pts when under sVirt, set an explicit mount option. Also set a max size on the /dev mount to prevent DOS on memory usage * src/lxc/lxc_container.c:

Re: [libvirt] [PATCH 7/7] Set a security context on /dev and /dev/pts mounts

2012-01-24 Thread Eric Blake
On 01/24/2012 01:21 PM, Eric Blake wrote: +if (virAsprintf(opts, mode=755,size=65536%%%s%s%s, +con ? ,context=\ : , +con ? (const char *)con : , +con ? \ : ) 0) { I would have split this: if

[libvirt] [PATCH] qemu: Emit bootindex even for direct boot

2012-01-24 Thread Jiri Denemark
Direct boot (using kernel, initrd, and command line) is used by virt-install/virt-manager for network install. While any bootindex has no direct effect since -kernel is always first, we need it as a hint for SeaBIOS to present disks in the same order as they will be presented during normal boot.

Re: [libvirt] [PATCH] qemu: Emit bootindex even for direct boot

2012-01-24 Thread Eric Blake
On 01/24/2012 03:53 PM, Jiri Denemark wrote: Direct boot (using kernel, initrd, and command line) is used by virt-install/virt-manager for network install. While any bootindex has no direct effect since -kernel is always first, we need it as a hint for SeaBIOS to present disks in the same

Re: [libvirt] [PATCH v2 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread MATSUDA, Daiki
I am happy that you provide the patches. These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest. --- src/qemu/qemu_agent.c | 74 + src/qemu/qemu_agent.h |3 ++ 2 files changed,

Re: [libvirt] [PATCH v2 1/3] qemu_agent: Create file system freeze and thaw functions

2012-01-24 Thread Eric Blake
On 01/24/2012 04:17 PM, MATSUDA, Daiki wrote: I am happy that you provide the patches. These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest. --- But qemuAgentFSFreeze() and qemuAgentFSThaw() are almost same. In addition, qemu

Re: [libvirt] Allow custom metadata in domain configuration XML

2012-01-24 Thread Eric Blake
On 01/23/2012 07:26 PM, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Applications can now insert custom nodes and hierarchies into domain cofiguration XML. Although currently not enforced, application are s/cofiguration/configuration/ s/application

[libvirt] [PATCH] build: simplify xmlFreeNode usage

2012-01-24 Thread Eric Blake
Noticed while reviewing the previous patch; thankfully, there are no violations. * cfg.mk (useless_free_options): Add xmlFreeNode. --- +if (def-metadata) +xmlFreeNode(def-metadata); Useless use of if before free, since xmlFreeNode is documented as a no-op on NULL. I'll update

[libvirt] [PATCH] metadata: group metadata next to description

2012-01-24 Thread Eric Blake
It's better to group all the metadata together. This is a cosmetic output change; since the RNG allows interleave, it doesn't matter where the user stuck it on input, and an XPath query will find it in the same location when parsing the output. * src/conf/domain_conf.c

Re: [libvirt] [PATCH] metadata: group metadata next to description

2012-01-24 Thread Zeeshan Ali (Khattak)
On Wed, Jan 25, 2012 at 2:28 AM, Eric Blake ebl...@redhat.com wrote: It's better to group all the metadata together.  This is a cosmetic output change; since the RNG allows interleave, it doesn't matter where the user stuck it on input, and an XPath query will find it in the same location when

Re: [libvirt] [PATCH] metadata: group metadata next to description

2012-01-24 Thread Eric Blake
On 01/24/2012 05:49 PM, Zeeshan Ali (Khattak) wrote: On Wed, Jan 25, 2012 at 2:28 AM, Eric Blake ebl...@redhat.com wrote: It's better to group all the metadata together. This is a cosmetic output change; since the RNG allows interleave, it doesn't matter where the user stuck it on input, and

[libvirt] [PATCH] docs: fix a few small typos in formatdomain.html.in

2012-01-24 Thread Laine Stump
--- Pushed under the trivial rule. docs/formatdomain.html.in | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index dca9a81..dfb010d 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

Re: [libvirt] [PATCH][RFC] adding a title to the domain description informations

2012-01-24 Thread Daniel Veillard
On Tue, Jan 24, 2012 at 08:06:31AM -0700, Eric Blake wrote: On 01/24/2012 07:18 AM, Daniel Veillard wrote: The idea is that currently we have only the domain name usable as a description for the domain. It is not really a good human readable identifier, as the kind of string allowed is