[libvirt] [PATCH] conf: fix error for parallel port mismatch

2013-04-11 Thread Ján Tomko
--- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 68f024f..36a46da 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11940,7 +11940,7 @@

Re: [libvirt] [PATCH] conf: fix error for parallel port mismatch

2013-04-11 Thread Ján Tomko
On 04/11/2013 09:44 AM, Peter Krempa wrote: On 04/11/13 09:18, Ján Tomko wrote: --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK, Peter. Thanks, pushed. Jan -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] conf: fix error for parallel port mismatch

2013-04-11 Thread Peter Krempa
On 04/11/13 09:18, Ján Tomko wrote: --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK, Peter. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v3] qemu: Set correct migrate host in client_migrate_info

2013-04-11 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=920441 Currently, we are discarding listen attribute from qemu cookie even though we strive to gather it. This result in not so cool bug: if user have different networks, one for management/migration, and one for VNC/SPICE we pass incorrect host to the

Re: [libvirt] [Xen-devel] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup

2013-04-11 Thread Ian Campbell
On Thu, 2013-04-11 at 05:09 +0100, Jim Fehlig wrote: +/* This will fill xenstore info about free and dom0 memory - if missing, + * should be called before starting first domain */ +if (libxl_get_free_memory(libxl_driver-ctx, free_mem)) { +VIR_ERROR(_(cannot get free

Re: [libvirt] [PATCH v3] qemu: Set correct migrate host in client_migrate_info

2013-04-11 Thread Daniel P. Berrange
On Thu, Apr 11, 2013 at 09:49:03AM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=920441 Currently, we are discarding listen attribute from qemu cookie even though we strive to gather it. This result in not so cool bug: if user have different networks, one for

Re: [libvirt] [PATCH v4 1/2] Add USB option capability

2013-04-11 Thread Daniel P. Berrange
On Sun, Apr 07, 2013 at 04:31:57PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com To avoid the collision for creating USB controllers in machine-init() and -device xx command line, it needs to set usb=off to avoid one USB controller created in machine-init(). So that

Re: [libvirt] [PATCH v4 2/2]testcase: Add a new USB option test case

2013-04-11 Thread Daniel P. Berrange
On Sun, Apr 07, 2013 at 04:31:58PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Add one test case to test CLI with -machine xxx,usb=off. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- .../qemuxml2argv-machine-usb-opt.args | 5 +

Re: [libvirt] [PATCH v3 1/3] Add NVRAM device

2013-04-11 Thread Daniel P. Berrange
On Wed, Mar 27, 2013 at 01:07:54PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not supported in libvirt. So this patch is to add NVRAM

Re: [libvirt] [PATCH v3 3/3] Add NVRAM test cases

2013-04-11 Thread Daniel P. Berrange
On Wed, Mar 27, 2013 at 01:07:56PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add NVRAM test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- .../qemuxml2argv-pseries-nvram.args|1 +

Re: [libvirt] [PATCH v4 2/2]testcase: Add a new USB option test case

2013-04-11 Thread Li Zhang
On 2013年04月11日 17:31, Daniel P. Berrange wrote: On Sun, Apr 07, 2013 at 04:31:58PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Add one test case to test CLI with -machine xxx,usb=off. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com ---

[libvirt] [PATCH] qemu: fix crash in qemuOpen

2013-04-11 Thread Ján Tomko
If the path part of connection URI is not present, cfg is used unitialized. https://bugzilla.redhat.com/show_bug.cgi?id=950855 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2c0d7d1..0d41e39

Re: [libvirt] [PATCH] qemu: fix crash in qemuOpen

2013-04-11 Thread Peter Krempa
On 04/11/13 11:42, Ján Tomko wrote: If the path part of connection URI is not present, cfg is used unitialized. https://bugzilla.redhat.com/show_bug.cgi?id=950855 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. Peter -- libvir-list mailing list

Re: [libvirt] [PATCH v3 1/3] Add NVRAM device

2013-04-11 Thread Li Zhang
On 2013年04月11日 17:36, Daniel P. Berrange wrote: On Wed, Mar 27, 2013 at 01:07:54PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not

Re: [libvirt] [PATCH 1/1][RESEND] ppc64 cpu features

2013-04-11 Thread Daniel P. Berrange
On Thu, Mar 14, 2013 at 02:54:21PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch adds a CPU feature powernv identifying IBM Power processor that supports native hypervisor e.g. KVM. This can be used by virtualization management software to determine the CPU

Re: [libvirt] [PATCH 1/1][RESEND] Set legacy USB option with default for ppc64.

2013-04-11 Thread Li Zhang
On 2013年04月11日 17:41, Daniel P. Berrange wrote: On Sun, Apr 07, 2013 at 05:00:06PM +0800, Li Zhang wrote: On 2013年03月14日 14:54, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Currently, -device xxx still can't work well for ppc64 platform. It's better use legacy USB option with

Re: [libvirt] [PATCH v3 07/16] Refactor cgroups internal data structures

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the virCgroupPtr struct contains 3 pieces of information - path - path of the cgroup, relative to current process' cgroup placement - placement - current process' placement in each

Re: [libvirt] [PATCH v3 08/16] Add misc extra debugging into cgroups code

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/vircgroup.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) ACK Michal -- libvir-list mailing list

Re: [libvirt] [PATCH v3 11/16] Add XML config for resource partitions

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- docs/formatdomain.html.in| 26 ++ docs/schemas/domaincommon.rng| 12 +

Re: [libvirt] [PATCH v3 12/16] Change default cgroup layout for QEMU/LXC and honour XML config

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Historically QEMU/LXC guests have been placed in a cgroup layout that is $LOCATION-OF-LIBVIRTD/libvirt/{qemu,lxc}/$VMNAME This is bad for a number of reasons - The cgroup hierarchy gets

Re: [libvirt] [PATCH v3 16/16] Replace LXC cgroup mount code with call to virCgroupIsolateMount

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The LXC driver currently has code to detect cgroups mounts and then re-mount them inside the new root filesystem. Replace this fragile code with a call to virCgroupIsolateMount. Signed-off-by:

Re: [libvirt] [PATCH v3 14/16] Track symlinks for co-mounted cgroup controllers

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a cgroup controller is co-mounted with another, eg /sys/fs/cgroup/cpu,cpuacct Then it is a requirement that there exist symlinks at /sys/fs/cgroup/cpu /sys/fs/cgroup/cpuacct

Re: [libvirt] [PATCH v3 09/16] Cleanup if creating cgroup directories fails

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently if virCgroupMakeGroup fails, we can get in a situation where some controllers have been setup, but others not. Ensure we call virCgroupRemove to remove what we've done upon failure

Re: [libvirt] [PATCH v3 13/16] Remove non-functional code for setting up non-root cgroups

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virCgroupNewDriver method had a 'bool privileged' param. If a false value was ever passed in, it would simply not work, since non-root users don't have any privileges to create new cgroups. Just

Re: [libvirt] [PATCH v3 15/16] Add an API for re-mounting cgroups, to isolate the process location

2013-04-11 Thread Michal Privoznik
On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add a virCgroupIsolateMount method which looks at where the current process is place in the cgroups (eg /system/demo.lxc.libvirt) and then remounts the cgroups such that this sub-directory becomes

Re: [libvirt] [PATCH v3 06/16] Add a test suite for cgroups functionality

2013-04-11 Thread Daniel P. Berrange
On Wed, Apr 10, 2013 at 09:04:33PM -0600, Eric Blake wrote: On 04/10/2013 04:08 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Some aspects of the cgroups setup / detection code are quite subtle and easy to break. It would greatly benefit from unit testing,

Re: [libvirt] [PATCH 1/1][RESEND] ppc64 cpu features

2013-04-11 Thread Li Zhang
On 2013年04月11日 17:50, Daniel P. Berrange wrote: On Thu, Mar 14, 2013 at 02:54:21PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch adds a CPU feature powernv identifying IBM Power processor that supports native hypervisor e.g. KVM. This can be used by

Re: [libvirt] [Xen-devel] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup

2013-04-11 Thread Marek Marczykowski
On 11.04.2013 09:52, Ian Campbell wrote: On Thu, 2013-04-11 at 05:09 +0100, Jim Fehlig wrote: +/* This will fill xenstore info about free and dom0 memory - if missing, + * should be called before starting first domain */ +if (libxl_get_free_memory(libxl_driver-ctx, free_mem)) {

Re: [libvirt] [Xen-devel] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup

2013-04-11 Thread Ian Campbell
On Thu, 2013-04-11 at 11:53 +0100, Marek Marczykowski wrote: On 11.04.2013 09:52, Ian Campbell wrote: On Thu, 2013-04-11 at 05:09 +0100, Jim Fehlig wrote: +/* This will fill xenstore info about free and dom0 memory - if missing, + * should be called before starting first domain

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-11 Thread Laine Stump
On 04/10/2013 05:26 AM, Daniel P. Berrange wrote: On Tue, Apr 09, 2013 at 04:06:06PM -0400, Laine Stump wrote: On 04/09/2013 04:58 AM, Daniel P. Berrange wrote: On Mon, Apr 08, 2013 at 03:32:07PM -0400, Laine Stump wrote: Actually I do wonder if we should reprent a PCI root as two controller

[libvirt] [PATCH] virsh: Update list of shutdown/reboot modes

2013-04-11 Thread Michal Privoznik
As of 76d9f65644 we are supporting two new modes: initctl and signal. However, these are missing in help listing. --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c088468..bd6192e 100644 ---

[libvirt] [PATCH] bridge: add the firewalld zone support

2013-04-11 Thread Federico Simoncelli
This patch adds the support for the firewalld zones in the virtual bridges managed by libvirt allowing to configure the rules as for all the other interfaces. After assigning a fwzone to the bridge it is then possible to configure the firewall rules through the firwalld daemon, e.g. enabling or

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-11 Thread Michael S. Tsirkin
On Thu, Apr 11, 2013 at 07:03:56AM -0400, Laine Stump wrote: On 04/10/2013 05:26 AM, Daniel P. Berrange wrote: On Tue, Apr 09, 2013 at 04:06:06PM -0400, Laine Stump wrote: On 04/09/2013 04:58 AM, Daniel P. Berrange wrote: On Mon, Apr 08, 2013 at 03:32:07PM -0400, Laine Stump wrote:

[libvirt] [libvirt-designer][PATCH] Don't redefine _FORTIFY_SOURCE macro

2013-04-11 Thread Michal Privoznik
If the _FORTIFY_SOURCE has been already defined, we unconditionally redefine it, leaving us with warning/error thrown at compilation time. --- m4/virt-compile-warnings.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4

Re: [libvirt] [libvirt-designer 3/3] Rework disk bus type handling

2013-04-11 Thread Michal Privoznik
On 03.04.2013 11:20, Christophe Fergeau wrote: The current handling of bus types has some issues: - it assumes that if the design uses a disk controller hanging off a PCI bus, then it can use virtio, which is not true for Windows for example unless an additional driver is installed - it

[libvirt] [libvirt-designer][PATCH] test: Adapt to new gvir_designer_domain_new signature

2013-04-11 Thread Michal Privoznik
After 46be1aed the signature of gvir_designer_domain_new has changed. The OsinfoDb parameter appeared there. However, the test suite hasn't been adapted. --- libvirt-designer/test-designer-domain.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [libvirt-designer][PATCH] Don't redefine _FORTIFY_SOURCE macro

2013-04-11 Thread Zeeshan Ali (Khattak)
On Thu, Apr 11, 2013 at 2:31 PM, Michal Privoznik mpriv...@redhat.com wrote: If the _FORTIFY_SOURCE has been already defined, we unconditionally redefine it, leaving us with warning/error thrown at compilation time. --- ACK -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCHv3] Support for static routes on a virtual bridge

2013-04-11 Thread Gene Czarcinski
This patch adds support for adding a static route for a network. The gateway sub-element specifies the gateway's IP address. Both IPv4 and IPv6 static routes are supported although it is expected that this functionality will have more use with IPv6. This updates add the route element to define

Re: [libvirt] [libvirt-designer][PATCH] test: Adapt to new gvir_designer_domain_new signature

2013-04-11 Thread Zeeshan Ali (Khattak)
On Thu, Apr 11, 2013 at 3:01 PM, Michal Privoznik mpriv...@redhat.com wrote: After 46be1aed the signature of gvir_designer_domain_new has changed. The OsinfoDb parameter appeared there. However, the test suite hasn't been adapted. --- ACK. -- Regards, Zeeshan Ali (Khattak) FSF member#5124

Re: [libvirt] [Autotest] [RFC] Autotest Project Weekly Hangout

2013-04-11 Thread Amos Kong
CC: qemu-devel, kvm, libvirt-list On Thu, Apr 11, 2013 at 4:43 AM, Lucas Meneghel Rodrigues l...@redhat.comwrote: Hi guys, I'd like to propose yet another hipster-y initiative: A weekly hangout, where contributors from all affiliations that work on autotest/virt-tests or any project under

Re: [libvirt] [libvirt-designer][PATCH] Don't redefine _FORTIFY_SOURCE macro

2013-04-11 Thread Michal Privoznik
On 11.04.2013 14:07, Zeeshan Ali (Khattak) wrote: On Thu, Apr 11, 2013 at 2:31 PM, Michal Privoznik mpriv...@redhat.com wrote: If the _FORTIFY_SOURCE has been already defined, we unconditionally redefine it, leaving us with warning/error thrown at compilation time. --- ACK Pushed,

Re: [libvirt] [libvirt-designer][PATCH] test: Adapt to new gvir_designer_domain_new signature

2013-04-11 Thread Michal Privoznik
On 11.04.2013 14:10, Zeeshan Ali (Khattak) wrote: On Thu, Apr 11, 2013 at 3:01 PM, Michal Privoznik mpriv...@redhat.com wrote: After 46be1aed the signature of gvir_designer_domain_new has changed. The OsinfoDb parameter appeared there. However, the test suite hasn't been adapted. --- ACK.

[libvirt] libvirt libxl driver leaking libxl_event's?

2013-04-11 Thread Ian Campbell
Hi Jim, I don't see any calls to libxl_event_dispose in libvirt.git, libxl_event.h says in relation to the event_occurs callback: * event becomes owned by the application and must be freed, either * by event_occurs or later. so does this mean the memory referenced by event is leaked by

[libvirt] [PATCH] qemu: Use QMP for send-key if supported

2013-04-11 Thread Peter Krempa
Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_driver.c | 25 +++-- src/qemu/qemu_monitor.c | 5 ++-- src/qemu/qemu_monitor.h | 3 ++-

Re: [libvirt] [PATCH] virsh: Update list of shutdown/reboot modes

2013-04-11 Thread Peter Krempa
On 04/11/13 13:14, Michal Privoznik wrote: As of 76d9f65644 we are supporting two new modes: initctl and signal. However, these are missing in help listing. --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ACK. Peter -- libvir-list mailing list

Re: [libvirt] [PATCH] qemu: Use QMP for send-key if supported

2013-04-11 Thread Peter Krempa
On 04/11/13 15:00, Eric Blake wrote: On 04/11/2013 06:45 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- +++ b/src/qemu/qemu_monitor.c @@ -3008,14 +3008,15 @@ int qemuMonitorInjectNMI(qemuMonitorPtr mon) int

Re: [libvirt] [PATCH] qemu: Use QMP for send-key if supported

2013-04-11 Thread Eric Blake
On 04/11/2013 06:45 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- +++ b/src/qemu/qemu_monitor.c @@ -3008,14 +3008,15 @@ int qemuMonitorInjectNMI(qemuMonitorPtr mon) int qemuMonitorSendKey(qemuMonitorPtr mon,

Re: [libvirt] [Xen-devel] libvirt libxl driver leaking libxl_event's?

2013-04-11 Thread Ian Campbell
On Thu, 2013-04-11 at 13:46 +0100, Ian Campbell wrote: Hi Jim, I don't see any calls to libxl_event_dispose in libvirt.git, actually I think I meant libxl_event_free, but I can't see that either. libxl_event.h says in relation to the event_occurs callback: * event becomes owned by the

[libvirt] [PATCHv2] qemu: Try to use QMP for send-key if supported

2013-04-11 Thread Peter Krempa
Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- Notes: Version 2: - always try QMP instead of adding capability bit src/qemu/qemu_monitor_json.c | 69 1 file changed, 64 insertions(+), 5 deletions(-) diff

Re: [libvirt] [libvirt-designer 3/3] Rework disk bus type handling

2013-04-11 Thread Christophe Fergeau
Hi, On Thu, Apr 11, 2013 at 01:33:50PM +0200, Michal Privoznik wrote: For some reason this patch cannot be applied cleanly: Applying: Rework disk bus type handling error: patch failed: libvirt-designer/libvirt-designer-domain.c:992 error: libvirt-designer/libvirt-designer-domain.c: patch

[libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread harryxiyou
Hi all, I copy portions of libvirt/src/storage/storage_backend_sheepdog.c [...] 125 ret = virCommandRun(cmd, NULL); 126 if (ret == 0) 127 ret = virStorageBackendSheepdogParseNodeInfo(pool-def, output); [...] I found virCommandRun may return '-1', which hinds something error

[libvirt] [libvirt-designer v3] Add Vala API

2013-04-11 Thread Zeeshan Ali (Khattak)
From: Zeeshan Ali (Khattak) zeesha...@gnome.org This is mostly (modified) copypaste from libvirt-glib. --- v3: Added .metadata file to correct init functions vapi. Makefile.am | 2 +- configure.ac | 37 +

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread Michal Privoznik
On 11.04.2013 15:33, harryxiyou wrote: Hi all, I copy portions of libvirt/src/storage/storage_backend_sheepdog.c [...] 125 ret = virCommandRun(cmd, NULL); 126 if (ret == 0) 127 ret = virStorageBackendSheepdogParseNodeInfo(pool-def, output); [...] I found virCommandRun

Re: [libvirt] [PATCH] qemu: Use QMP for send-key if supported

2013-04-11 Thread Daniel P. Berrange
On Thu, Apr 11, 2013 at 03:06:51PM +0200, Peter Krempa wrote: On 04/11/13 15:00, Eric Blake wrote: On 04/11/2013 06:45 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- +++ b/src/qemu/qemu_monitor.c @@ -3008,14 +3008,15 @@ int

Re: [libvirt] [PATCH] qemu: Use QMP for send-key if supported

2013-04-11 Thread Peter Krempa
On 04/11/13 15:41, Daniel P. Berrange wrote: On Thu, Apr 11, 2013 at 03:06:51PM +0200, Peter Krempa wrote: On 04/11/13 15:00, Eric Blake wrote: On 04/11/2013 06:45 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- +++

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread harryxiyou
On Thu, Apr 11, 2013 at 9:38 PM, Michal Privoznik mpriv...@redhat.com wrote: [...] Maybe you've pasted wrong code snippet, but the one you've pasted is correct. If virCommandRun() fails and returns -1; we return that value to the caller. And if the command doesn't fail, we call

Re: [libvirt] [PATCH v3 01/16] Introduce a virFileDeleteTree method

2013-04-11 Thread Daniel P. Berrange
On Wed, Apr 10, 2013 at 11:25:10AM -0600, Eric Blake wrote: On 04/10/2013 04:08 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Introduce a method virFileDeleteTree for recursively deleting an entire directory tree Signed-off-by: Daniel P. Berrange

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread Eric Blake
On 04/11/2013 07:48 AM, harryxiyou wrote: On Thu, Apr 11, 2013 at 9:38 PM, Michal Privoznik mpriv...@redhat.com wrote: [...] Maybe you've pasted wrong code snippet, but the one you've pasted is correct. If virCommandRun() fails and returns -1; we return that value to the caller. And if the

Re: [libvirt] [PATCHv2] qemu: Try to use QMP for send-key if supported

2013-04-11 Thread Eric Blake
On 04/11/2013 07:15 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- Notes: Version 2: - always try QMP instead of adding capability bit Lots smaller :) ACK. +/* create single key object */ +if (!(key

[libvirt] [PATCH] virsh: Document that using incomplete XML files may have unexpected results

2013-04-11 Thread Peter Krempa
Explicitly state that using incomplete XML definition snippets for hot-management commands may have unexpected results due to autogenerating values for some of the fields if they aren't specified explicitly. --- tools/virsh.pod | 12 1 file changed, 12 insertions(+) diff --git

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread Michal Privoznik
On 11.04.2013 15:48, harryxiyou wrote: On Thu, Apr 11, 2013 at 9:38 PM, Michal Privoznik mpriv...@redhat.com wrote: [...] Maybe you've pasted wrong code snippet, but the one you've pasted is correct. If virCommandRun() fails and returns -1; we return that value to the caller. And if the

Re: [libvirt] [PATCH v3 07/16] Refactor cgroups internal data structures

2013-04-11 Thread Daniel P. Berrange
On Thu, Apr 11, 2013 at 12:02:05PM +0200, Michal Privoznik wrote: On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the virCgroupPtr struct contains 3 pieces of information - path - path of the cgroup, relative to current process'

Re: [libvirt] [PATCH v3 05/16] Rename virCgroupForXXX to virCgroupNewXXX

2013-04-11 Thread Daniel P. Berrange
On Wed, Apr 10, 2013 at 08:56:03PM -0600, Eric Blake wrote: On 04/10/2013 04:08 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Rename all the virCgroupForXXX methods to use the form virCgroupNewXXX since they are all constructors. Also make sure the output

Re: [libvirt] [PATCH v3 10/16] Add a new virCgroupNewPartition for setting up resource partitions

2013-04-11 Thread Daniel P. Berrange
On Thu, Apr 11, 2013 at 12:02:30PM +0200, Michal Privoznik wrote: On 10.04.2013 12:08, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com A resource partition is an absolute cgroup path, ignoring the current process placement. Expose a virCgroupNewPartition API for

Re: [libvirt] [PATCH] virsh: Document that using incomplete XML files may have unexpected results

2013-04-11 Thread Eric Blake
On 04/11/2013 08:32 AM, Peter Krempa wrote: Explicitly state that using incomplete XML definition snippets for hot-management commands may have unexpected results due to autogenerating values for some of the fields if they aren't specified explicitly. --- tools/virsh.pod | 12

Re: [libvirt] [PATCHv2] qemu: Try to use QMP for send-key if supported

2013-04-11 Thread Peter Krempa
On 04/11/13 16:29, Eric Blake wrote: On 04/11/2013 07:15 AM, Peter Krempa wrote: Instead of always using HMP use the QMP send-key command introduced in qemu 1.3. --- Notes: Version 2: - always try QMP instead of adding capability bit Lots smaller :) ACK. +/* create

[libvirt] [PATCH] Fix error return value for VirCommandNewArgList

2013-04-11 Thread harryxiyou
From: Harry Wei harryxi...@gmail.com virCommandNewArgList may return NULL so we need not do following stuffs and just return '-1'. Signed-off-by: Harry Wei harryxi...@gmail.com CC: Osier Yang jy...@redhat.com CC: Michal Privoznik mpriv...@redhat.com --- src/storage/storage_backend_sheepdog.c |

Re: [libvirt] [PATCH] Fix error return value for VirCommandNewArgList

2013-04-11 Thread Eric Blake
On 04/11/2013 08:35 AM, harryxi...@gmail.com wrote: From: Harry Wei harryxi...@gmail.com virCommandNewArgList may return NULL so we need not do following stuffs and just return '-1'. Signed-off-by: Harry Wei harryxi...@gmail.com CC: Osier Yang jy...@redhat.com CC: Michal Privoznik

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread harryxiyou
On Thu, Apr 11, 2013 at 10:26 PM, Eric Blake ebl...@redhat.com wrote: Hi Eric, [...] Not necessary. virCommand is DESIGNED for streamlined usage, so that it is much easier to read how the command is constructed without being distracted by error checking in the caller every step of the way.

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread Daniel P. Berrange
On Thu, Apr 11, 2013 at 10:48:05PM +0800, harryxiyou wrote: On Thu, Apr 11, 2013 at 10:26 PM, Eric Blake ebl...@redhat.com wrote: Hi Eric, [...] Not necessary. virCommand is DESIGNED for streamlined usage, so that it is much easier to read how the command is constructed without being

Re: [libvirt] [RFC] virCommandRun return error number

2013-04-11 Thread Eric Blake
On 04/11/2013 08:48 AM, harryxiyou wrote: On Thu, Apr 11, 2013 at 10:26 PM, Eric Blake ebl...@redhat.com wrote: Hi Eric, [...] Not necessary. virCommand is DESIGNED for streamlined usage, so that it is much easier to read how the command is constructed without being distracted by error

Re: [libvirt] [PATCH] virsh: Document that using incomplete XML files may have unexpected results

2013-04-11 Thread Peter Krempa
On 04/11/13 16:37, Eric Blake wrote: On 04/11/2013 08:32 AM, Peter Krempa wrote: Explicitly state that using incomplete XML definition snippets for hot-management commands may have unexpected results due to autogenerating values for some of the fields if they aren't specified explicitly. ---

Re: [libvirt] [PATCH v4 01/11] Add QMP probing for TPM

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:52AM -0400, Stefan Berger wrote: Probe for QEMU's QMP TPM support by querying the lists of supported TPM models (query-tpm-models) and backend types (query-tpm-types). The setting of the capability flags following the strings returned from the commands above

Re: [libvirt] [PATCH v4 03/11] Add documentation and schema for TPM passthrough

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:54AM -0400, Stefan Berger wrote: Supported TPM passthrough XML may look as follows: tpm model='tpm-tis' backend type='passthrough' device path='/dev/tpm0'/ /backend /tpm Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com

Re: [libvirt] [PATCH v4 02/11] Add function to find a needle in a string array

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:53AM -0400, Stefan Berger wrote: Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/libvirt_private.syms |1 + src/util/virstring.c |

Re: [libvirt] [PATCH v4 04/11] Helper functions for host TPM support

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:55AM -0400, Stefan Berger wrote: Implement helper functions to find the TPM's sysfs cancel file. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH v4 06/11] Convert QMP strings into QEMU capability bits

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:57AM -0400, Stefan Berger wrote: Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c | 56

Re: [libvirt] [PATCH v4 05/11] Parse TPM passthrough XML in the domain XML

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:56AM -0400, Stefan Berger wrote: Parse the domain XML with TPM passthrough support. The TPM passthrough XML may look like this: tpm model='tpm-tis' backend type='passthrough' device path='/dev/tpm0'/ /backend /tpm

Re: [libvirt] [libvirt-designer v3] Add Vala API

2013-04-11 Thread Christophe Fergeau
On Thu, Apr 11, 2013 at 04:32:30PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org This is mostly (modified) copypaste from libvirt-glib. --- v3: Added .metadata file to correct init functions vapi. Makefile.am | 2 +-

Re: [libvirt] [PATCH v4 08/11] Audit the starting of a guest using TPM passthrough

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:59AM -0400, Stefan Berger wrote: When a VM with a TPM passthrough device is started, the audit daemon logs the following type of message: type=VIRT_RESOURCE msg=audit(1365170222.460:3378): pid=16382 uid=0 auid=4294967295 ses=4294967295

Re: [libvirt] [PATCH v4 07/11] Add SELinux and DAC labeling support for TPM passthrough

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:05:58AM -0400, Stefan Berger wrote: Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/security/security_dac.c | 53 ++

Re: [libvirt] [PATCH v4 10/11] TPM support for QEMU command line

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:06:01AM -0400, Stefan Berger wrote: For TPM passthrough device support create command line parameters like: -tpmdev passthrough,id=tpm-tpm0,path=/dev/tpm0,cancel-path=/sys/class/misc/tpm0/device/cancel -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 Signed-off-by:

Re: [libvirt] [PATCH v4 09/11] QEMU Cgroup support for TPM passthrough

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:06:00AM -0400, Stefan Berger wrote: Some refactoring for virDomainChrSourceDef type of devices so we can use common code. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant

Re: [libvirt] [PATCH v4 11/11] Add test case for TPM passthrough

2013-04-11 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:06:02AM -0400, Stefan Berger wrote: Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args |6

[libvirt] [PATCH] qemu: Do not report unsafe migration for local files

2013-04-11 Thread Jiri Denemark
When migrating a domain with disk images stored locally (and using storage migration), we should not complain about unsafe migration no matter what cache policy is used for that disk. --- src/qemu/qemu_migration.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH v4 11/11] Add test case for TPM passthrough

2013-04-11 Thread Stefan Berger
On 04/11/2013 11:43 AM, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 10:06:02AM -0400, Stefan Berger wrote: Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH v2 1/2] Remove extraneous comma in info_cpu_stats and opts_cpu_stats

2013-04-11 Thread Ján Tomko
On 04/08/2013 05:35 PM, John Ferlan wrote: --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ACK, trivial. Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 2/2] Add error handling to optional arguments in cmdCPUStats

2013-04-11 Thread Ján Tomko
On 04/08/2013 05:35 PM, John Ferlan wrote: --- tools/virsh-domain.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e6e6877..6d760f2 100644 --- a/tools/virsh-domain.c +++

Re: [libvirt] [PATCH v2 1/2] Remove extraneous comma in info_cpu_stats and opts_cpu_stats

2013-04-11 Thread Eric Blake
On 04/08/2013 09:35 AM, John Ferlan wrote: --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c088468..e6e6877 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6111,7 +6111,7

Re: [libvirt] [Xen-devel] libvirt libxl driver leaking libxl_event's?

2013-04-11 Thread Jim Fehlig
On 04/11/2013 07:09 AM, Ian Campbell wrote: On Thu, 2013-04-11 at 13:46 +0100, Ian Campbell wrote: Hi Jim, I don't see any calls to libxl_event_dispose in libvirt.git, actually I think I meant libxl_event_free, but I can't see that either. Right. I confirmed that was needed with Ian J. a

Re: [libvirt] [PATCH] qemu: Do not report unsafe migration for local files

2013-04-11 Thread Jiri Denemark
On Thu, Apr 11, 2013 at 11:47:03 -0600, Eric Blake wrote: On 04/11/2013 10:32 AM, Jiri Denemark wrote: When migrating a domain with disk images stored locally (and using storage migration), we should not complain about unsafe migration no matter what cache policy is used for that disk.

[libvirt] [PATCH v5 08/11] Audit the starting of a guest using TPM passthrough

2013-04-11 Thread Stefan Berger
When a VM with a TPM passthrough device is started, the audit daemon logs the following type of message: type=VIRT_RESOURCE msg=audit(1365170222.460:3378): pid=16382 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=dev reason=start vm=TPM-PT

[libvirt] [PATCH v5 04/11] Helper functions for host TPM support

2013-04-11 Thread Stefan Berger
Implement helper functions to find the TPM's sysfs cancel file. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- po/POTFILES.in |1 src/Makefile.am |1

[libvirt] [PATCH v5 09/11] QEMU Cgroup support for TPM passthrough

2013-04-11 Thread Stefan Berger
Some refactoring for virDomainChrSourceDef type of devices so we can use common code. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/qemu/qemu_cgroup.c | 53

[libvirt] [PATCH v5 06/11] Convert QMP strings into QEMU capability bits

2013-04-11 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c | 58 +++ 1 file changed, 58 insertions(+) Index:

[libvirt] [PATCH v5 02/11] Add function to find a needle in a string array

2013-04-11 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/libvirt_private.syms |1 + src/util/virstring.c | 14 ++ src/util/virstring.h |2 ++ 3 files

[libvirt] [PATCH v5 00/11] Add support for guests with TPM passthrough device

2013-04-11 Thread Stefan Berger
Hello! The following set of patches adds support to libvirt for adding a TPM passthrough device to a QEMU guest. Support for this was recently accepted into QEMU. This set of patches borrows a lot from the recently added support for rng's. Regards, Stefan --- v4-v5: - followed tree to

[libvirt] [PATCH v5 07/11] Add SELinux and DAC labeling support for TPM passthrough

2013-04-11 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/security/security_dac.c | 53 ++ src/security/security_selinux.c | 94

[libvirt] [PATCH v5 10/11] TPM support for QEMU command line

2013-04-11 Thread Stefan Berger
For TPM passthrough device support create command line parameters like: -tpmdev passthrough,id=tpm-tpm0,path=/dev/tpm0,cancel-path=/sys/class/misc/tpm0/device/cancel -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant

[libvirt] [PATCH v5 03/11] Add documentation and schema for TPM passthrough

2013-04-11 Thread Stefan Berger
Supported TPM passthrough XML may look as follows: tpm model='tpm-tis' backend type='passthrough' device path='/dev/tpm0'/ /backend /tpm Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant

  1   2   >