[libvirt] [RFC PATCH] support multifunction PCI device

2011-05-10 Thread Wen Congyang
We want to use more than 200+ device. Libvirt does not use multi function PCI device and PCI-to-PCI bridge. So we can not use more than 200+ device if it's a PCI device or it's controller is a PCI device. This patch adds the support of multi function PCI device. It does not support to hot

Re: [libvirt] [PATCH] apparmor: Fix uninitalized variable warning in virt-aa-helper

2011-05-10 Thread Matthias Bolte
2011/5/8 Jamie Strandboge ja...@strandboge.com: On Sat, 7 May 2011 13:13:41 +0200, Matthias Bolte matthias.bo...@googlemail.com wrote: ---  src/security/virt-aa-helper.c |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/security/virt-aa-helper.c

[libvirt] [PATCH] Documentation on tests suites and new API test suite

2011-05-10 Thread Daniel Veillard
This is really a dual mail. The main point is announcing the availability of the livirt-test-API, a GPL'ed Python based test suite for libvirt functional testing. It was developped independantly of the TCK by our QA group here in Beijing China and is now made open-source. The software

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake ebl...@redhat.com: On 05/07/2011 06:28 AM, Matthias Bolte wrote: ---  daemon/Makefile.am                 |   20 -  daemon/qemu_dispatch.blacklist     |    3 +  daemon/qemu_dispatch.whitelist     |    1 +  daemon/remote_dispatch.blacklist   |   37  

[libvirt] [PATCH] Fix two uninitialized variable warnings

2011-05-10 Thread Matthias Bolte
gcc only reports them when compiling with -O3. --- src/util/interface.c |2 +- tools/virsh.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/interface.c b/src/util/interface.c index 5e1987a..04a922c 100644 --- a/src/util/interface.c +++

Re: [libvirt] [PATCH] Fix two uninitialized variable warnings

2011-05-10 Thread Wen Congyang
At 05/10/2011 02:40 PM, Matthias Bolte Write: gcc only reports them when compiling with -O3. I compile libvirt with -O3, and recieve the same warnings. ACK. --- src/util/interface.c |2 +- tools/virsh.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 0/6 V4] Add support for injecting NMI to guest

2011-05-10 Thread Lai Jiangshan
This patch series implements a feature of injecting NMI to guest, which is accessible via new virDomainInjectNMI API and 'inject-nmi' command in virsh. Lai Jiangshan (6): inject-nmi: Defining the public API inject-nmi: Defining the internal API inject-nmi: Implementing the public API

[libvirt] [PATCH 3/6 V4] inject-nmi: Implementing the public API

2011-05-10 Thread Lai Jiangshan
--- src/libvirt.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..f468b61 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -5217,6 +5217,50 @@ error: } /** + *

[libvirt] [PATCH 6/6 V4] qemu, inject-nmi: Implement the driver methods

2011-05-10 Thread Lai Jiangshan
--- src/qemu/qemu_driver.c | 46 +- src/qemu/qemu_monitor.c | 14 src/qemu/qemu_monitor.h |2 + src/qemu/qemu_monitor_json.c | 27 src/qemu/qemu_monitor_json.h |1 +

[libvirt] [PATCH 1/6 V4] inject-nmi: Defining the public API

2011-05-10 Thread Lai Jiangshan
--- include/libvirt/libvirt.h.in |2 ++ src/libvirt_public.syms |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 5783303..0e1e27a 100644 --- a/include/libvirt/libvirt.h.in +++

[libvirt] [PATCH 5/6 V4] inject-nmi: Expose the new API in virsh

2011-05-10 Thread Lai Jiangshan
--- tools/virsh.c | 35 +++ tools/virsh.pod |4 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2b16714..c2dabd7 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2912,6 +2912,40 @@

[libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol

2011-05-10 Thread Lai Jiangshan
--- daemon/remote_generator.pl |2 +- src/remote/remote_driver.c |2 +- src/remote/remote_protocol.x |8 +++- src/remote_protocol-structs |4 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index

Re: [libvirt] [PATCH] Remove all generated RPC files from GIT

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 12:51:24PM -0600, Eric Blake wrote: On 05/09/2011 03:21 AM, Daniel P. Berrange wrote: +my $fixup = $^O eq linux; I guess I'll see what happens when I try this on Cygwin, but if there are any followups needed, it should be separate patches. As is, cygwin already

Re: [libvirt] [TCK] [PATCH] Switch to installation of FC14 image and other fixes

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 10:07:49PM +0100, Richard W.M. Jones wrote: On Mon, May 09, 2011 at 04:49:48PM -0400, Stefan Berger wrote: On 05/09/2011 05:26 AM, Daniel P. Berrange wrote: On Fri, May 06, 2011 at 10:39:52AM -0400, Stefan Berger wrote: This patch fixes the creation of VM images.

Re: [libvirt] [TCK] [PATCH] Switch to installation of FC14 image and other fixes

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 04:49:48PM -0400, Stefan Berger wrote: On 05/09/2011 05:26 AM, Daniel P. Berrange wrote: On Fri, May 06, 2011 at 10:39:52AM -0400, Stefan Berger wrote: This patch fixes the creation of VM images. Previously, FC12 images were created but the files necessary for FC12

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: On 05/07/2011 06:28 AM, Matthias Bolte wrote: --- daemon/Makefile.am | 20 - daemon/qemu_dispatch.blacklist |3 + daemon/qemu_dispatch.whitelist |1 + daemon/remote_dispatch.blacklist |

Re: [libvirt] [TCK] [PATCH] Switch to installation of FC14 image and other fixes

2011-05-10 Thread Richard W.M. Jones
On Tue, May 10, 2011 at 10:16:42AM +0100, Daniel P. Berrange wrote: The reason I thought we'd use libguestfs appliance directly is thta I thought it could be useful to have the guestfs daemon running in the image, so that the test suite can easily query the state of the guest OS We probably

[libvirt] [PATCH v3 0/4] vcpupin: configure inactive domains' CPU affinity setting

2011-05-10 Thread Taku Izumi
Hi all, This patchset enables us to configure inactive domains' CPU affinity setting. v2 - v3: - rebase *[PATCH 1/4] vcpupin: inroduce a new libvir API (virDomainPinVcpuFlags) *[PATCH 2/4] vcpupin: implement the code to address the new API in the qemu driver *[PATCH 3/4] vcpupin:

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 01:12:10PM -0700, David L Stevens wrote: This patch removes remaining pieces of IP address learning. Do we actually want todo this ? This is effectively causing a regression in functionality for anyone who's relying on the current IP learning support, but who does not

[libvirt] [PATCH 2/4] vcpupin: implement the code to address the new API in the qemu driver

2011-05-10 Thread Taku Izumi
This patch implements the code to address the new API (virDomainPinVcpuFlags) in the qemu driver. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/qemu/qemu_driver.c | 100 + 1 file changed, 76 insertions(+), 24 deletions(-) Index:

[libvirt] [PATCH 1/4] vcpupin: inroduce a new libvir API (virDomainPinVcpuFlags)

2011-05-10 Thread Taku Izumi
This patch introduces a new libvirt API (virDomainPinVcpuFlags) Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- include/libvirt/libvirt.h.in |6 +++ src/driver.h |7 +++ src/esx/esx_driver.c |1 src/libvirt.c| 83

[libvirt] [PATCH 3/4] vcpupin: implement the remote protocol to address the new API

2011-05-10 Thread Taku Izumi
This patch implements the remote protocol to address the new API (virDomainPinVcpuFlags). Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/remote/remote_driver.c |2 +- src/remote/remote_protocol.x | 10 +- src/remote_protocol-structs |9 + 3 files

Re: [libvirt] [RFC][PATCH 3/7] interface: implement the public APIs

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 09:28:49PM +0200, Michal Privoznik wrote: --- src/libvirt.c | 129 + 1 files changed, 129 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..d9b659d 100644 ---

[libvirt] [PATCH 4/4] vcpupin: add the new options to virsh vcpupin command

2011-05-10 Thread Taku Izumi
This patch adds the new option (--live, --config and --current) to virsh vcpupin command. The behavior of above aption is the same as that of virsh setmem, virsh setvcpus, and whatnot. When the --config option is specified, the command affects a persistent domain, while --live option is

Re: [libvirt] [RFC][PATCH 7/7] interface: implement test driver

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 09:28:53PM +0200, Michal Privoznik wrote: --- src/test/test_driver.c | 116 ++- 1 files changed, 113 insertions(+), 3 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 83dcf1a..9ae6e7a 100644

Re: [libvirt] [PATCH 1/2] virsh: flexibility in CA cert and user cert/key

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 10:00:53AM -0500, Doug Goldstein wrote: Allow the CA certificate to come from the user's home directory or from the global location independently of the client certificate/key pair. Mostly for the case when each user on a system has their own cert/key pair but the

Re: [libvirt] [RFC][PATCH 2/7] interface: define internal driver API

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 09:28:48PM +0200, Michal Privoznik wrote: --- src/driver.h | 12 src/esx/esx_interface_driver.c |3 +++ src/interface/netcf_driver.c |3 +++ src/phyp/phyp_driver.c |5 - src/remote/remote_driver.c |3

Re: [libvirt] [PATCH 4/6] command: Add virCommandExec helper

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 01:26:09PM -0400, Cole Robinson wrote: Actually execs the argv/env we've generated, replacing the current process. Kind of has a limited usage, but allows us to use virCommand in LXC driver to launch the 'init' process Signed-off-by: Cole Robinson crobi...@redhat.com

Re: [libvirt] [RFC][PATCH 4/7] interface: implement the remote protocol

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 09:28:50PM +0200, Michal Privoznik wrote: --- src/remote/remote_driver.c |6 +++--- src/remote/remote_protocol.x | 18 +- src/remote_protocol-structs |9 + 3 files changed, 29 insertions(+), 4 deletions(-) diff --git

Re: [libvirt] [PATCH 2/6] lxc: driver: Convert emulator launching to virCommand

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 01:26:07PM -0400, Cole Robinson wrote: v2: Shorten a few virCommand calls s/remain/retain/ Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_driver.c | 185 ++ 1 files changed, 36

Re: [libvirt] [PATCH 5/6] lxc: container: Convert init exec to virCommand

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 01:26:10PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 33 ++--- 1 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/lxc/lxc_container.c

Re: [libvirt] [RFC][PATCH 5/7] interface: expose to virsh

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 09:28:51PM +0200, Michal Privoznik wrote: --- tools/virsh.c | 59 + 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2b16714..60efa10 100644 ---

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 05:24:09PM +0800, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__) When __VA_ARGS__ is empty, ## will

Re: [libvirt] [PATCH 2/2] docs: updates to CA cert and client cert/key info

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 10:01:04AM -0500, Doug Goldstein wrote: Update the documentation to mention that the CA certificate and the client cert/key pair can come from the user's location or the global location independent of each other. Signed-off-by: Doug Goldstein car...@gentoo.org ---

Re: [libvirt] [PATCH 6/6] lxc: container: Build init cmd before we close stdout

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 01:26:11PM -0400, Cole Robinson wrote: That way we can log the 'init' argv for debugging. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 41 + 1 files changed, 25 insertions(+), 16

Re: [libvirt] [PATCH] virsh: Correctly initialize libvirt

2011-05-10 Thread Daniel P. Berrange
On Mon, May 09, 2011 at 04:04:41PM +0200, Matthias Bolte wrote: 2011/5/9 Jiri Denemark jdene...@redhat.com: virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in

Re: [libvirt] [PATCH 3/6] lxc: driver: Improve logging when launching emulator

2011-05-10 Thread Daniel P. Berrange
On Fri, May 06, 2011 at 01:26:08PM -0400, Cole Robinson wrote: Log the full command line and a timestamp like we do for QEMU Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_driver.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff

Re: [libvirt] [TCK] [PATCH] Switch to installation of FC14 image and other fixes

2011-05-10 Thread Stefan Berger
On 05/10/2011 05:17 AM, Daniel P. Berrange wrote: On Mon, May 09, 2011 at 04:49:48PM -0400, Stefan Berger wrote: On 05/09/2011 05:26 AM, Daniel P. Berrange wrote: On Fri, May 06, 2011 at 10:39:52AM -0400, Stefan Berger wrote: This patch fixes the creation of VM images. Previously, FC12 images

[libvirt] [PATCH 1/2] xen: parse and generate hpet item in sxpr

2011-05-10 Thread Paolo Bonzini
Recent versions of Xen disable the virtual HPET by default. This is usually more precise because tick policies are not implemented for the HPET in Xen. However, there may be several reasons to control the HPET manually: 1) to test the emulation; 2) because distros may provide the knob while

[libvirt] [PATCH 0/2] xen/libxl: support enabling or disabling the HPET

2011-05-10 Thread Paolo Bonzini
This patch series add support for enabling or disabling the HPET in Xen domains. It's split in two because I didn't have means to test the libxl part. Paolo Bonzini (2): xen: parse and generate hpet item in sxpr libxl: support enabling the HPET src/libxl/libxl_conf.c

[libvirt] [PATCH 2/2] libxl: support enabling the HPET

2011-05-10 Thread Paolo Bonzini
libxl accepts hpet configuration in its domain info struct. Parse the domain definition's clock element in order to set the value. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- src/libxl/libxl_conf.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-10 Thread D. Herrendoerfer
Hi all, starting with kernel 2.6.38 macvtap supports a 'passthru' mode for attaching virtual functions of a SRIOV capable network card directly to a VM. This patch adds the capability to configure such a device. Signed-off-by: Dirk Herrendoerfer d.herrendoerfer at herrendoerfer.name diff

Re: [libvirt] [TCK] [PATCH] Switch to installation of FC14 image and other fixes

2011-05-10 Thread Richard W.M. Jones
On Tue, May 10, 2011 at 06:38:15AM -0400, Stefan Berger wrote: On 05/10/2011 05:17 AM, Daniel P. Berrange wrote: On Mon, May 09, 2011 at 04:49:48PM -0400, Stefan Berger wrote: On 05/09/2011 05:26 AM, Daniel P. Berrange wrote: On Fri, May 06, 2011 at 10:39:52AM -0400, Stefan Berger wrote: This

[libvirt] [PATCH v2 3/9] virDomainGetState public API implementation

2011-05-10 Thread Jiri Denemark
--- Notes: Version 2: - rebased - unsigned int flags src/libvirt.c | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..571eb97 100644 --- a/src/libvirt.c +++

[libvirt] [PATCH v2 0/9] Introduce virDomainGetState API

2011-05-10 Thread Jiri Denemark
This new API solves several problems: - calling virDomainGetInfo for just getting domain status is an overkill since it may result in sending requests to guest OS - since virDomainGetInfo can hang when guest OS is not responding and it is used by virsh list, listing domains can hang -

[libvirt] [PATCH v2 4/9] Wire protocol format and dispatcher for virDomainGetState

2011-05-10 Thread Jiri Denemark
--- Notes: Version 2: - rebased - unsigned int flags daemon/remote.c | 33 + daemon/remote_generator.pl |3 ++- src/remote/remote_protocol.x | 13 - src/remote_protocol-structs |8 4 files changed, 55

[libvirt] [PATCH v2 5/9] virsh: Prefer virDomainGetState over virDomainGetInfo

2011-05-10 Thread Jiri Denemark
--- Notes: Version 2: - rebased - unsigned int flags - noGetState renamed as useGetInfo tools/virsh.c | 195 +++-- 1 files changed, 162 insertions(+), 33 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[libvirt] [PATCH v2 2/9] Internal driver API for virDomainGetState

2011-05-10 Thread Jiri Denemark
--- Notes: Version 2: - rebased - unsigned int flags parameter - avoid changing xenUnifiedDriver internal callback struct src/driver.h |6 ++ src/esx/esx_driver.c |1 + src/libxl/libxl_driver.c |1 + src/lxc/lxc_driver.c |1 +

[libvirt] [PATCH v2 6/9] remote: Implement virDomainGetState

2011-05-10 Thread Jiri Denemark
--- Notes: Version 2: - rebased - unsigned int flags daemon/remote_generator.pl |3 ++- src/remote/remote_driver.c | 35 ++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl

[libvirt] [PATCH v2 1/9] virDomainGetState public API

2011-05-10 Thread Jiri Denemark
This API is supposed to replace virDomainGetInfo when the only purpose of calling it is getting current domain status. --- Notes: Version 2: - rebased - unsigned int flags parameter - updated version info in public.syms include/libvirt/libvirt.h.in| 56

[libvirt] [PATCH v3 1/8] screenshot: Defining the public API

2011-05-10 Thread Michal Privoznik
Add public API for taking screenshots of current domain console. * include/libvirt/libvirt.h.in: add virDomainScreenshot * src/libvirt_public.syms: Export new symbol --- include/libvirt/libvirt.h.in |7 +++ src/libvirt_public.syms |5 + 2 files changed, 12 insertions(+), 0

[libvirt] [PATCH v2 7/9] Implement basic virDomainGetState in all drivers

2011-05-10 Thread Jiri Denemark
Reason is currently always set to 0 (i.e., *_UNKNOWN). --- Notes: Version 2: - rebased - unsigned int flags - simplified implementation in esx driver per Matthias' suggestion - call internal xen drivers directly instead of going through xenUnifiedDriver src/esx/esx_driver.c

[libvirt] [PATCH v3 0/8] Add support for taking screenshots of domain console

2011-05-10 Thread Michal Privoznik
This series adds support for taking screenshots of a running domain console. The iohelper was added a new argument - delete file after transfer. This is needed, because the screenshot is written to file and asynchronously transferred to client. New API is accessible via virsh screenshot domain

[libvirt] [PATCH v2 9/9] qemu: Update domain state when reconnecting monitor

2011-05-10 Thread Jiri Denemark
A qemu domain can get paused when libvirtd is stopped (e.g., because of I/O error) so we should check its current state when reconnecting to it. --- Notes: Version 2: - new patch src/qemu/qemu_monitor.c | 20 src/qemu/qemu_monitor.h |1 +

[libvirt] [PATCH v3 3/8] screenshot: Implementing the public API

2011-05-10 Thread Michal Privoznik
* src/libvirt.c: new function --- src/libvirt.c | 56 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..2320ddb 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2412,6 +2412,62

[libvirt] [PATCH v3 2/8] screenshot: Defining the internal API

2011-05-10 Thread Michal Privoznik
* src/driver.h: Stub code for new API * src/esx/esx_driver.c, src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, rc/remote/remote_driver.c, rc/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,

[libvirt] [PATCH v3 4/8] screenshot: Implementing the remote protocol

2011-05-10 Thread Michal Privoznik
* src/remote/remote_protocol.x: Wire protocol definition * daemon/remote.c: New function * daemon/remote_generator.pl: Don't generate remote function body * src/remote/remote_driver.c: Client side * src/remote_protocol-structs: Add structures --- daemon/remote.c | 57

[libvirt] [PATCH v3 5/8] screenshot: Expose the new API in virsh

2011-05-10 Thread Michal Privoznik
* tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command --- tools/virsh.c | 90 +++ tools/virsh.pod |4 ++ 2 files changed, 94 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[libvirt] [PATCH v3 6/8] virFDStream: Add option for delete file after it's opening

2011-05-10 Thread Michal Privoznik
This is needed if we want to transfer a temporary file. If the transfer is done with iohelper, we might run into a race condition, where we unlink() file before iohelper is executed. * src/fdstream.c, src/fdstream.h, src/util/iohelper.c: Add new option * src/lxc/lxc_driver.c,

[libvirt] [PATCH v3 7/8] qemu: Implement the driver methods

2011-05-10 Thread Michal Privoznik
* src/qemu/qemu_driver.c: new qemuDomainScreenshot() function * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Monitor command --- src/qemu/qemu_driver.c | 80

[libvirt] [PATCH v3 8/8] vbox: Implement the driver methods

2011-05-10 Thread Michal Privoznik
* src/vbox/vbox_tmpl.c: New vboxDomainScreenshot() function --- src/vbox/vbox_tmpl.c | 113 ++ 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 9a110f9..fd34a12 100644 ---

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Jiri Denemark
On Mon, May 09, 2011 at 17:24:09 +0800, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__) When __VA_ARGS__ is empty, ## will

Re: [libvirt] [PATCH v3 1/8] screenshot: Defining the public API

2011-05-10 Thread Matthias Bolte
2011/5/10 Michal Privoznik mpriv...@redhat.com: Add public API for taking screenshots of current domain console. * include/libvirt/libvirt.h.in: add virDomainScreenshot * src/libvirt_public.syms: Export new symbol ---  include/libvirt/libvirt.h.in |    7 +++  src/libvirt_public.syms    

Re: [libvirt] [PATCH v2 5/9] virsh: Prefer virDomainGetState over virDomainGetInfo

2011-05-10 Thread Jiri Denemark
On Tue, May 10, 2011 at 15:39:07 +0200, Jiri Denemark wrote: --- Notes: Version 2: - rebased - unsigned int flags - noGetState renamed as useGetInfo tools/virsh.c | 195 +++-- 1 files changed, 162 insertions(+), 33

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:28:22PM +0200, Jiri Denemark wrote: On Mon, May 09, 2011 at 17:24:09 +0800, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...)

Re: [libvirt] [PATCH v2] Add support for YAJL version 2 API/ABI

2011-05-10 Thread Eric Blake
On 05/09/2011 10:50 AM, Daniel P. Berrange wrote: Version 2.0.0 or yajl changed API. It is fairly trivial for us to cope with both APIs in libvirt, so adapt. * configure.ac: Probe for yajl2 API * src/util/json.c: Conditional support for yajl2 API --- configure.ac|8 ++

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Eric Blake
On 05/09/2011 03:24 AM, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__) When __VA_ARGS__ is empty, ## will swallow the , in

Re: [libvirt] [PATCH v2] Allow destroying QEMU VM even if a job is active

2011-05-10 Thread Eric Blake
On 05/09/2011 10:58 AM, Daniel P. Berrange wrote: Introduce a virProcessKill function that can be safely called even when the job mutex is held. This allows virDomainDestroy to kill any VM even if it is asleep in a monitor job. The PID will die and the thread asleep on the monitor will then

Re: [libvirt] [PATCH] Fix two uninitialized variable warnings

2011-05-10 Thread Matthias Bolte
2011/5/10 Wen Congyang we...@cn.fujitsu.com: At 05/10/2011 02:40 PM, Matthias Bolte Write: gcc only reports them when compiling with -O3. I compile libvirt with -O3, and recieve the same warnings. ACK. Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Matthias Bolte
2011/5/10 Daniel P. Berrange berra...@redhat.com: On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: On 05/07/2011 06:28 AM, Matthias Bolte wrote: ---  daemon/Makefile.am                 |   20 -  daemon/qemu_dispatch.blacklist     |    3 +  daemon/qemu_dispatch.whitelist    

Re: [libvirt] [PATCH 00/12] esx: Generator improvments and general cleanups

2011-05-10 Thread Matthias Bolte
2011/5/1 Matthias Bolte matthias.bo...@googlemail.com: As we're currently in feature freeze, this series is meant for 0.9.2. It includes mostly generator improvments and general cleanups. 10/12 is a race condition fix, but it's not critical because it's not that simple to trigger. Matthias

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-10 Thread David Stevens
Daniel P. Berrange berra...@redhat.com wrote on 05/10/2011 02:28:25 AM: From: Daniel P. Berrange berra...@redhat.com To: David Stevens/Beaverton/IBM@IBMUS Cc: libvirt-l...@redhat.com Date: 05/10/2011 02:32 AM Subject: Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter On

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Eric Blake
On 05/10/2011 08:52 AM, Eric Blake wrote: On 05/09/2011 03:24 AM, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__) When

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 05:23:23PM +0200, Matthias Bolte wrote: 2011/5/10 Daniel P. Berrange berra...@redhat.com: On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: On 05/07/2011 06:28 AM, Matthias Bolte wrote: ---  daemon/Makefile.am                 |   20 -  

[libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-10 Thread Christophe Fergeau
glibc 2.13.90 has obsoleted its rpc implementation in favour of the one provided by the TI-RPC library: * The RPC implementation in libc is obsoleted. Old programs keep working but new programs cannot be linked with the routines in libc anymore. Programs in need of RPC functionality must

Re: [libvirt] how to assign an ip when assign a NIC or VF to the Virtual Machine?

2011-05-10 Thread Laine Stump
2011/5/8 Richard W.M. Jones rjo...@redhat.com mailto:rjo...@redhat.com On Sun, May 08, 2011 at 10:56:54AM +0800, guan qin wrote: The second solution you mentioned may be difficult , because when I assign the ethX to the VM, the X in the 'ethX' is random (the 'X' in the

Re: [libvirt] [RFC][PATCH 1/7] interface: add new public API

2011-05-10 Thread Laine Stump
On 05/10/2011 05:35 AM, Daniel P. Berrange wrote: On Mon, May 09, 2011 at 09:28:47PM +0200, Michal Privoznik wrote: API agreed on in: https://www.redhat.com/archives/libvir-list/2011-May/msg00026.html --- include/libvirt/libvirt.h.in |7 +++ src/libvirt_public.syms |7

Re: [libvirt] [RFC][PATCH 3/7] interface: implement the public APIs

2011-05-10 Thread Laine Stump
On 05/10/2011 05:38 AM, Daniel P. Berrange wrote: On Mon, May 09, 2011 at 09:28:49PM +0200, Michal Privoznik wrote: --- src/libvirt.c | 129 + 1 files changed, 129 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Matthias Bolte
2011/5/10 Daniel P. Berrange berra...@redhat.com: On Tue, May 10, 2011 at 05:23:23PM +0200, Matthias Bolte wrote: 2011/5/10 Daniel P. Berrange berra...@redhat.com: On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: On 05/07/2011 06:28 AM, Matthias Bolte wrote: ---  

[libvirt] [PATCH] qemu: allow blkstat/blkinfo calls during migration

2011-05-10 Thread Federico Simoncelli
References: - https://www.redhat.com/archives/libvir-list/2011-May/msg00210.html - https://www.redhat.com/archives/libvir-list/2011-May/msg00287.html --- src/qemu/qemu_domain.c|6 +++ src/qemu/qemu_domain.h|7 src/qemu/qemu_driver.c| 86

Re: [libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-10 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 05:42:06PM +0200, Christophe Fergeau wrote: glibc 2.13.90 has obsoleted its rpc implementation in favour of the one provided by the TI-RPC library: * The RPC implementation in libc is obsoleted. Old programs keep working but new programs cannot be linked with the

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Richard W.M. Jones
On Tue, May 10, 2011 at 04:32:57PM +0100, Daniel P. Berrange wrote: Yeah, either we duplicate the VIR_CONNECT_RO flag checks in the remote dispatch, or we could actually generate the libvirt.c and driver.h files too, based on the RPC. advocacy More code generation is better. Here is all the

Re: [libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-10 Thread Eric Blake
On 05/10/2011 10:13 AM, Daniel P. Berrange wrote: ACK, but someone should file a BZ about the duplicated definitions to get them fixed, because we need to be able to build with -Werror enabled Cygwin is facing the same problem with duplicate definitions - solve it for one platform, and you'll

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Eric Blake
On 05/10/2011 09:29 AM, Eric Blake wrote: ##__VA_ARGS__ is a GNU extension; it does not work on all C99 compilers. I'm worried that this is not portable. But, we CAN do: #ifdef __GNUC__ # define high_level(fmt, ...) low_level(fmt, ##__VA_ARGS__) #else suitably expanded (and we can

Re: [libvirt] [PATCH] Documentation on tests suites and new API test suite

2011-05-10 Thread Eric Blake
On 05/10/2011 12:21 AM, Daniel Veillard wrote: I hesitated between creating a new doc section and trying to reuse one existing, but it didn't fit well in any of the existing section, though that could have been added under Download or Related links but it was feeling a bit weird in both case

Re: [libvirt] [PATCH 6/6] lxc: container: Build init cmd before we close stdout

2011-05-10 Thread Cole Robinson
On 05/10/2011 05:49 AM, Daniel P. Berrange wrote: On Fri, May 06, 2011 at 01:26:11PM -0400, Cole Robinson wrote: That way we can log the 'init' argv for debugging. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 41 +

Re: [libvirt] [PATCH 0/6 V4] Add support for injecting NMI to guest

2011-05-10 Thread Eric Blake
On 05/10/2011 03:13 AM, Daniel P. Berrange wrote: On Tue, May 10, 2011 at 04:26:00PM +0800, Lai Jiangshan wrote: This patch series implements a feature of injecting NMI to guest, which is accessible via new virDomainInjectNMI API and 'inject-nmi' command in virsh. Lai Jiangshan (6):

Re: [libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol

2011-05-10 Thread Eric Blake
On 05/10/2011 02:26 AM, Lai Jiangshan wrote: --- daemon/remote_generator.pl |2 +- src/remote/remote_driver.c |2 +- src/remote/remote_protocol.x |8 +++- src/remote_protocol-structs |4 4 files changed, 13 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH 2/6 V4] inject-nmi: Defining the internal API

2011-05-10 Thread Eric Blake
On 05/10/2011 02:26 AM, Lai Jiangshan wrote: src/xen/xen_driver.c |1 + src/xen/xen_driver.h |1 + No need to modify the xenUnified callback struct. +++ b/src/xen/xen_driver.h @@ -108,6 +108,7 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType

Re: [libvirt] [PATCH 3/6 V4] inject-nmi: Implementing the public API

2011-05-10 Thread Eric Blake
On 05/10/2011 02:26 AM, Lai Jiangshan wrote: --- src/libvirt.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..f468b61 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@

Re: [libvirt] [PATCH 1/5] Rename internal DumpXML functions to GetXMLDesc

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake ebl...@redhat.com: On 05/07/2011 06:28 AM, Matthias Bolte wrote: This matches the public API and helps to get rid of some speical case s/speical/special/ code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included

[libvirt] Crash state and QEMU

2011-05-10 Thread Anthony Liguori
Hi, As far as I can tell, if QEMU exits abruptly or with a non-zero status code, libvirt treats this as a domain destruction given no real indication to the user that something bad happened. But libvirt does have a crashed state for domains, it's just not used for QEMU guests. I was

Re: [libvirt] [PATCH 2/5] remote generator: Fix comment ignoring regex

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake ebl...@redhat.com: On 05/07/2011 06:28 AM, Matthias Bolte wrote: ---  daemon/remote_generator.pl |    4 ++--  1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index b06e51a..8d62c37 100755 ---

Re: [libvirt] [PATCH 3/5] remote generator: Unify unsigned int notation in .x files

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake ebl...@redhat.com: On 05/07/2011 06:28 AM, Matthias Bolte wrote: Rename u_int and unsigned to unsigned int. This gets rid of some special case code in the generator. ---  daemon/remote_generator.pl   |   10 +++---  src/remote/remote_protocol.x |   72

Re: [libvirt] [PATCH 4/5] remote generator: Make parsing stricter

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake ebl...@redhat.com: On 05/07/2011 06:28 AM, Matthias Bolte wrote: Anchor matches at the beginning of a line. Specialize some general matches. Add some comments to special cases. ---  daemon/remote_generator.pl |  172 +++-  1

Re: [libvirt] Crash state and QEMU

2011-05-10 Thread Richard W.M. Jones
On Tue, May 10, 2011 at 01:26:39PM -0500, Anthony Liguori wrote: As far as I can tell, if QEMU exits abruptly or with a non-zero status code, libvirt treats this as a domain destruction given no real indication to the user that something bad happened. libvirtd raises an event. There is (was?)

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Richard W.M. Jones
I should maybe add that if you're going to do this, you should think about having a single generator program. There's nothing worse for maintainability than having scripts generating files generating files generating code, and no one can tell what generates what. In libguestfs there's never a

[libvirt] [PATCH 00/16] More virCommand conversions and cleanups

2011-05-10 Thread Cole Robinson
The following series converts all users of several older command wrappers (virRunWithHook, virExecDaemonize, and virExec) to use virCommand. The remaining functionality is then moved out of util.c and into command.c Cole Robinson (16): remote_driver: Convert virExecDaemonize usage to virCommand

[libvirt] [PATCH 03/16] command: Allow setting a NULL hook function

2011-05-10 Thread Cole Robinson
This allows a caller to unset a hook function for an existing virCommand instance. Will be used in storage_backend.c Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/command.c |2 +- src/util/command.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 02/16] util: Combine __virExec and virExecWithHook

2011-05-10 Thread Cole Robinson
All callers were expecting argv logging, so the split is unneeded. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/util.c | 86 ++ 1 files changed, 35 insertions(+), 51 deletions(-) diff --git a/src/util/util.c

  1   2   >