Re: [libvirt] Upgrade-problems from qemu-0.14.1 + libvirt-0.8.4 to qemu-0.15.1 + libvirt-0.9.6: Why I think multifunction=on is a bad idea...

2011-11-28 Thread Philipp Hahn
Hello, On Thursday 17 November 2011 18:39:15 Eric Blake wrote: > Is any of this worth keeping on the public libvir-list? Not much but to be careful when you upgrade any part of libvirt, qemu(-kvm) or it's (external*) dependencies like etherboot/iPXE, vgabios and seabios, because it can invalida

Re: [libvirt] RE : Re: [PATCH] util: fix thinko in runIO

2011-11-28 Thread Paolo Bonzini
On 11/26/2011 02:14 PM, Bastien ROUCARIES wrote: Malloc page than realloc to smaller does not work ? There is no constraint that realloc(X, N) returns X, even if N is smaller than the previous allocation size. Paolo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/m

[libvirt] VBOX driver : "An error occurred, but the cause is unknown" when trying to start a Virtualbox domain

2011-11-28 Thread Jean-Christophe Guillain
Hello, I opened a bug (http://bugzilla.redhat.com/show_bug.cgi?id=757138) about this issue, but I was told to mention it to this list too. Here is my problem : when I try to start a virtualbox domain with virsh, an error occurs. (But when the domain is started using Virtualbox GUI it works, and I

[libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Srivatsa S. Bhat
Add the core functions that implement the functionality of the API. Suspend is done by using an asynchronous mechanism so that we can return the status to the caller before the host gets suspended. This asynchronous operation is achieved by suspending the host in a separate thread of execution. How

Re: [libvirt] [PATCH 2/5] Support CPU placement in LXC driver

2011-11-28 Thread Daniel P. Berrange
On Thu, Nov 24, 2011 at 09:55:26PM +0800, Daniel Veillard wrote: > On Thu, Nov 24, 2011 at 11:38:13AM +, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > While LXC does not have the concept of VCPUS, so we cann't do > > s/nn/n/ > > > per-VCPU pCPU placement, we can support

Re: [libvirt] [PATCH 3/5] Add support for CPU quota/period to LXC driver

2011-11-28 Thread Daniel P. Berrange
On Thu, Nov 24, 2011 at 10:05:50PM +0800, Daniel Veillard wrote: > On Thu, Nov 24, 2011 at 11:38:14AM +, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > * src/lxc/lxc_driver.c: Support changing quota/period for LXC > > containers > > * src/lxc/lxc_controller.c: Set initial

Re: [libvirt] [PATCH 2/5] Support CPU placement in LXC driver

2011-11-28 Thread Daniel Veillard
On Thu, Nov 24, 2011 at 11:38:13AM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > While LXC does not have the concept of VCPUS, so we cann't do s/nn/n/ > per-VCPU pCPU placement, we can support the VM level CPU > placement. Todo this simply set the CPU affinity of the LXC >

[libvirt] [ PATCH v4 0/4] API to invoke S3/S4 on a host and also resume from within libvirt

2011-11-28 Thread Srivatsa S. Bhat
This patchset adds a new API to put a host to a suspended state (Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend) and setup a timed resume to get the host back online, from within libvirt. This uses the RTC wakeup mechanism to set up a timer alarm before suspending the host, so that in-band resum

[libvirt] [PATCH] virnetsocket: pass XAUTORITY for ssh connection

2011-11-28 Thread Christian Franke
When spawning an ssh connection, the environment variables DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY, which is neccessary if the .Xauthority is in a non default place, was not passed. Signed-off-by: Christian Franke --- src/rpc/virnetsocket.c |1 + 1 files changed, 1 insertion

[libvirt] [PATCH v4 4/4] Add virsh command to initiate suspend on the host

2011-11-28 Thread Srivatsa S. Bhat
Add a new command 'nodesuspend' to perform a timed suspend on the host. Signed-off-by: Srivatsa S. Bhat --- tools/virsh.c | 64 +++ tools/virsh.pod |7 ++ 2 files changed, 71 insertions(+), 0 deletions(-) diff --git a/tools/virsh.

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 05:33:22PM +0530, Srivatsa S. Bhat wrote: > Add the core functions that implement the functionality of the API. > Suspend is done by using an asynchronous mechanism so that we can return > the status to the caller before the host gets suspended. This asynchronous > operation

Re: [libvirt] [PATCH] virnetsocket: pass XAUTORITY for ssh connection

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 01:15:25PM +0100, Christian Franke wrote: > When spawning an ssh connection, the environment variables > DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY, > which is neccessary if the .Xauthority is in a non default > place, was not passed. > > Signed-off-by: Christ

[libvirt] [PATCH v4 2/4] Add the remote protocol implementation for virNodeSuspendForDuration

2011-11-28 Thread Srivatsa S. Bhat
Implement the remote protocol for virNodeSuspendForDuration() API. Signed-off-by: Srivatsa S. Bhat --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 10 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/r

[libvirt] [PATCH v4 1/4] Add a public API to invoke suspend/resume on the host

2011-11-28 Thread Srivatsa S. Bhat
Implement the public definitions for the new API virNodeSuspendForDuration() which will be subsequently used to do a timed suspend on the host. Signed-off-by: Srivatsa S. Bhat --- include/libvirt/libvirt.h.in | 17 +++- src/driver.h |6 src/libvirt.c

[libvirt] [PATCH libvirt-glib 3/5] Add missing exports of GVirStream APIs

2011-11-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * libvirt-gobject/libvirt-gobject.sym: Export gvir_stream_receive, gvir_stream_send, gvir_stream_send_all --- libvirt-gobject/libvirt-gobject.sym |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt

[libvirt] [PATCH libvirt-glib 2/5] Add support for creating watches on streams

2011-11-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The GIO GInputStream/GOutputStream async model for I/O does not work for working with non-blocking bi-directional streams. To allow that to be done more effectively, add an API to allow main loop watches to be registered against streams. Since the libvirt level virStre

[libvirt] [PATCH libvirt-glib 1/5] Document some of the coding style conventions required

2011-11-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * HACKING: Add notes on coding style conventions --- HACKING | 221 ++- 1 files changed, 220 insertions(+), 1 deletions(-) diff --git a/HACKING b/HACKING index fe52c17..ea419e5 100644 --- a/HACKING +++ b/HAC

[libvirt] [PATCH libvirt-glib 5/5] Convert GVirInputStream/GVirOutputStream over to use watches

2011-11-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Since virStreamEventAddCallback only allows a single callback to be registered, GVirInputStream/GVirOutputStream should not use that directly. Instead they should use the gvir_stream_add_watch function * libvirt-gobject/libvirt-gobject-input-stream.c, libvirt-gobjec

[libvirt] [PATCH libvirt-glib 4/5] Cleanup streams coding style violations

2011-11-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- libvirt-gobject/libvirt-gobject-input-stream.c | 39 ++- libvirt-gobject/libvirt-gobject-input-stream.h | 27 + libvirt-gobject/libvirt-gobject-output-stream.c | 16 libvirt-gobject/libvirt-gobject-output-stream.h | 27

[libvirt] [PATCH libvirt-glib 0/5] Updates to streams APIs

2011-11-28 Thread Daniel P. Berrange
This patch series expands the streams APIs to allow practical use of non-blocking bi-directional streams. It also formally documents the required coding style conventions for libvirt-glib before we get too much more code that is out of the ordinary. -- libvir-list mailing list libvir-list@redhat.c

Re: [libvirt] [PATCH v4 1/4] Add a public API to invoke suspend/resume on the host

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 05:33:06PM +0530, Srivatsa S. Bhat wrote: > Implement the public definitions for the new API > virNodeSuspendForDuration() which will be subsequently used to > do a timed suspend on the host. > > Signed-off-by: Srivatsa S. Bhat > --- > > include/libvirt/libvirt.h.in |

Re: [libvirt] [PATCH v4 4/4] Add virsh command to initiate suspend on the host

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 05:33:29PM +0530, Srivatsa S. Bhat wrote: > Add a new command 'nodesuspend' to perform a timed suspend on the host. > > Signed-off-by: Srivatsa S. Bhat > --- > > tools/virsh.c | 64 > +++ > tools/virsh.pod |7 +

Re: [libvirt] Associate a LUN as disk with WWNN/WWPN

2011-11-28 Thread Dave Allan
On Fri, Nov 25, 2011 at 10:49:29AM +, Daniel P. Berrange wrote: > On Fri, Nov 25, 2011 at 06:42:42PM +0800, Osier Yang wrote: > > On 2011年11月25日 18:28, Daniel P. Berrange wrote: > > >On Fri, Nov 25, 2011 at 04:55:02PM +0800, Osier Yang wrote: > > > > > >> > > >> > > >>AFAIU libvirt needs a way

[libvirt] [PATCH] Make virt-xml-validate work with xbox domains

2011-11-28 Thread Lorin Hochstein
virt-xml-validate fails when run on a domain XML file of type 'vbox'. For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097 This patch updates the XML schema so it accepts type 'vbox'. --- diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index

Re: [libvirt] [PATCH] conf: Improve incorrect root element error messages

2011-11-28 Thread Laine Stump
On 11/25/2011 07:50 AM, Michal Privoznik wrote: When user pass wrong root element, it is not 'internal error' and we can give him hint what we are expecting. --- src/conf/domain_conf.c| 12 src/conf/interface_conf.c |6 -- src/conf/network_conf.c |

Re: [libvirt] [PATCH] storage: Refetch file status after open

2011-11-28 Thread Laine Stump
On 11/25/2011 07:28 AM, Michal Privoznik wrote: This partly reverts my previous patch f88de3eb. We need to get file status after open, as given path could have been symlink, so fstat() will operate on different file than lstat(). Just a general note about stat/lstat/fstat - especially when work

Re: [libvirt] [PATCH 3/8] Implement virDomain{Set, Get}BlockIoTune for the qemu driver

2011-11-28 Thread Adam Litke
On Wed, Nov 23, 2011 at 10:41:32AM -0700, Eric Blake wrote: > Hmm - passing nparams==1 to set just read_bytes_sec has the side effect > of wiping out any existing total_iops_sec, even though those two > parameters seem somewhat orthogonal, all because we zero-initialized the > struct that we pass

[libvirt] [libvirt-glib] Fix gvir_config_domain_clock_set_variable_offset

2011-11-28 Thread Christophe Fergeau
It was creating an extra node as a child of the "main" one which is not what was intended --- libvirt-gconfig/libvirt-gconfig-domain-clock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-clock.c b/libvirt-gconfig/libvirt-gconfig-

[libvirt] [libvirt-glib 10/13] Simplify GVirConfigDomainGraphicsSpice creation

2011-11-28 Thread Christophe Fergeau
Now that we have gvir_config_object_set_attribute, we can use the gvir_config_object_new{_from_xml} helpers. --- .../libvirt-gconfig-domain-graphics-spice.c| 34 +--- 1 files changed, 15 insertions(+), 19 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-g

[libvirt] [libvirt-glib 03/13] Set GVirConfigObject::doc during object creation

2011-11-28 Thread Christophe Fergeau
Now that we have a refcounted GVirConfigXmlDoc type, make sure we use it when creating objects deriving from GVirConfigObject. --- libvirt-gconfig/libvirt-gconfig-object.c | 40 +- 1 files changed, 28 insertions(+), 12 deletions(-) diff --git a/libvirt-gconfig/libvir

[libvirt] [libvirt-glib 12/13] Return a GVirConfigObject from gvir_config_object_replace_child

2011-11-28 Thread Christophe Fergeau
This makes it possible to use the other GVirConfigObject helpers with the new child, and hides libxml from one more place in our API. --- libvirt-gconfig/libvirt-gconfig-domain-disk.c |9 +++- .../libvirt-gconfig-domain-interface-network.c |7 ++- libvirt-gconfig/libvirt-gconfig-d

[libvirt] [libvirt-glib 01/13] Add GVirConfigXmlDoc type

2011-11-28 Thread Christophe Fergeau
This class derives from GObject and wraps an xmlDocPtr. It will be useful to refcount xmlDoc so that it can be shared between multiple GVirConfigObject instances. --- libvirt-gconfig/Makefile.am |4 +- libvirt-gconfig/libvirt-gconfig-xml-doc.c | 137 +

[libvirt] [libvirt-glib 04/13] GVirConfigObject is no longer an abstract type

2011-11-28 Thread Christophe Fergeau
Since we want to use GVirConfigObject as a simple wrapper over xmlNodePtr, we need to be able to create instances of this type for "arbitrary" xml nodes. --- libvirt-gconfig/libvirt-gconfig-object.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libvirt-gconfig/libvirt-g

[libvirt] [libvirt-glib 11/13] Return a GVirConfigObject from gvir_config_object_add_child

2011-11-28 Thread Christophe Fergeau
This makes it possible to use the other GVirConfigObject helpers with the new child, and hides libxml from one more place in our API. --- libvirt-gconfig/libvirt-gconfig-domain-disk.c| 29 -- libvirt-gconfig/libvirt-gconfig-object-private.h |4 +- libvirt-gconfig/libv

[libvirt] [libvirt-glib 09/13] Simplify GVirConfigDomainInterfaceNetwork creation

2011-11-28 Thread Christophe Fergeau
Now that we have gvir_config_object_set_attribute, we can use the gvir_config_object_new{_from_xml} helpers. --- .../libvirt-gconfig-domain-interface-network.c | 29 --- 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-in

[libvirt] [libvirt-glib 08/13] Use gvir_config_object_set_attribute where appropriate

2011-11-28 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-domain-clock.c | 42 +-- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 36 - .../libvirt-gconfig-domain-graphics-spice.c| 12 ++ libvirt-gconfig/libvirt-gconfig-domain-input.c | 26

[libvirt] [libvirt-glib 02/13] Add GVirConfigObject::doc property

2011-11-28 Thread Christophe Fergeau
It will be used to refcount the xml data and make sure we only free it when all references have went away. --- libvirt-gconfig/libvirt-gconfig-object.c | 63 ++ 1 files changed, 38 insertions(+), 25 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-object.c

[libvirt] [libvirt-glib 06/13] Use gvir_config_object_attach where appropriate

2011-11-28 Thread Christophe Fergeau
This allows us to properly refcount the underlying xmlDocPtr (and the associated xmlNodes) to avoid trying to free twice the same xmlNodes when disposing of GVirConfigObject referencing the same nodes. --- libvirt-gconfig/libvirt-gconfig-domain.c | 31 ++--- 1 files chang

[libvirt] [libvirt-glib 07/13] Add gvir_config_object_set_attribute{_with_type}

2011-11-28 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-object-private.h |4 + libvirt-gconfig/libvirt-gconfig-object.c | 110 ++ libvirt-gconfig/libvirt-gconfig.sym |2 + 3 files changed, 116 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig

[libvirt] [libvirt-glib 05/13] Add gvir_config_object_attach

2011-11-28 Thread Christophe Fergeau
It's needed to be able to keep track of references on the underlying GVirConfigXmlDoc when building a bigger xml tree from smaller separate xml nodes. --- libvirt-gconfig/libvirt-gconfig-object-private.h |2 ++ libvirt-gconfig/libvirt-gconfig-object.c | 17 + libvirt-

[libvirt] [libvirt-glib 13/13] Fix memory leaks in test-domain-create

2011-11-28 Thread Christophe Fergeau
Before the introduction of GVirConfigXmlDoc, we couldn't destroy the objects deriving from GVirConfigObject without memory corruption. Now that we have GVirConfigXmlDoc, we can make sure the memory we allocate for our various GVirConfigObject instances are properly cleaned up. --- libvirt-gconfig/

Re: [libvirt] [PATCH] conf: Improve incorrect root element error messages

2011-11-28 Thread Michal Privoznik
On 28.11.2011 16:06, Laine Stump wrote: > On 11/25/2011 07:50 AM, Michal Privoznik wrote: >> When user pass wrong root element, it is not 'internal error' and >> we can give him hint what we are expecting. >> --- >> src/conf/domain_conf.c| 12 >> src/conf/interface_conf.c

Re: [libvirt] [PATCH] conf: Improve incorrect root element error messages

2011-11-28 Thread Michal Privoznik
On 28.11.2011 16:06, Laine Stump wrote: > On 11/25/2011 07:50 AM, Michal Privoznik wrote: >> When user pass wrong root element, it is not 'internal error' and >> we can give him hint what we are expecting. >> --- >> src/conf/domain_conf.c| 12 >> src/conf/interface_conf.c

Re: [libvirt] [PATCH] conf: Improve incorrect root element error messages

2011-11-28 Thread Eric Blake
On 11/25/2011 05:50 AM, Michal Privoznik wrote: > When user pass wrong root element, it is not 'internal error' and > we can give him hint what we are expecting. > --- > src/conf/domain_conf.c| 12 > src/conf/interface_conf.c |6 -- > src/conf/network_conf.c

Re: [libvirt] [PATCH] Change security driver APIs to use virDomainDefPtr instead of virDomainObjPtr

2011-11-28 Thread Eric Blake
On 11/28/2011 05:26 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When sVirt is integrated with the LXC driver, it will be neccessary > to invoke the security driver APIs using only a virDomainDefPtr > since the lxc_container.c code has no virDomainObjPtr available. > Aside from

Re: [libvirt] [PATCH libvirt-glib 5/5] Convert GVirInputStream/GVirOutputStream over to use watches

2011-11-28 Thread Christophe Fergeau
On Mon, Nov 28, 2011 at 01:13:48PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Since virStreamEventAddCallback only allows a single callback > to be registered, GVirInputStream/GVirOutputStream should not > use that directly. Instead they should use the gvir_stream_add_watc

Re: [libvirt] [PATCH] Make virt-xml-validate work with xbox domains

2011-11-28 Thread Eric Blake
s/xbox/vbox/ in the subject On 11/28/2011 07:26 AM, Lorin Hochstein wrote: > virt-xml-validate fails when run on a domain XML file of type 'vbox'. > > For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097 > > This patch updates the XML schema so it accepts type 'vbox'. >

[libvirt] [PATCH] nwfilter: Update of filters to handle multiple IP addresses

2011-11-28 Thread Stefan Berger
With fragments borrowed from David Steven's previous submission and some further modifications: A set of modifications to existing filters to handle multiple IP addresses (and MAC addresses) per interface. Also: - enable DHCP traffic from VM to any DHCP server - will require an update to a libvi

[libvirt] [libvirt-glib] Remove now redundant debug system

2011-11-28 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" GLib >= 2.31 filters debug messages by default now[1] and provides ways to output debug log from selected domains only. This patch won't be any good without defining proper fine-grained log domains though. http://blogs.gnome.org/mclasen/2011/11/09/better-logging/ --

Re: [libvirt] [PATCH libvirt-glib 1/5] Document some of the coding style conventions required

2011-11-28 Thread Christophe Fergeau
On Mon, Nov 28, 2011 at 01:13:44PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > * HACKING: Add notes on coding style conventions > --- > HACKING | 221 > ++- > 1 files changed, 220 insertions(+), 1 deletions(-) >

Re: [libvirt] [PATCH] virnetsocket: pass XAUTORITY for ssh connection

2011-11-28 Thread Eric Blake
On 11/28/2011 05:21 AM, Daniel P. Berrange wrote: > On Mon, Nov 28, 2011 at 01:15:25PM +0100, Christian Franke wrote: >> When spawning an ssh connection, the environment variables >> DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY, >> which is neccessary if the .Xauthority is in a non defa

[libvirt] [PATCH] virsh: Don't traverse childless nodes in vshNodeIsSuperset

2011-11-28 Thread Michal Privoznik
If both nodes do not have any children, we pass zero to virBitmapAlloc which returns NULL. In turn we report OOM error and return false (meaning nodes are different). This is not true. --- tools/virsh.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tool

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Srivatsa S. Bhat
Hi Daniel, On 11/28/2011 05:50 PM, Daniel P. Berrange wrote: > On Mon, Nov 28, 2011 at 05:33:22PM +0530, Srivatsa S. Bhat wrote: >> Add the core functions that implement the functionality of the API. >> Suspend is done by using an asynchronous mechanism so that we can return >> the status to the

Re: [libvirt] [PATCH] virsh: Don't traverse childless nodes in vshNodeIsSuperset

2011-11-28 Thread Stefan Berger
On 11/28/2011 11:46 AM, Michal Privoznik wrote: If both nodes do not have any children, we pass zero to virBitmapAlloc which returns NULL. In turn we report OOM error and return false (meaning nodes are different). This is not true. --- tools/virsh.c |3 +++ 1 files changed, 3 insertions(+

Re: [libvirt] [PATCH] Make virt-xml-validate work with xbox domains

2011-11-28 Thread Lorin Hochstein
On Nov 28, 2011, at 11:23 AM, Eric Blake wrote: > s/xbox/vbox/ in the subject > Whoops... Hope I didn't disappoint anybody hoping for libvirt support on the xbox. > On 11/28/2011 07:26 AM, Lorin Hochstein wrote: >> virt-xml-validate fails when run on a domain XML file of type 'vbox'. >> >>

[libvirt] [PATCH 0/2] Expose virNodeGetCPUStats and virNodeGetMemoryStats in python

2011-11-28 Thread Peter Krempa
These patches add two API functions to the libvirt python bindings, that were missing. The constants denoting a summary stat value instead of a separate per-node values was declared using a preprocessor macro: ... #define VIR_NODE_MEMORY_STATS_ALL_CELLS (-1) #define VIR_NODE_CPU_STATS_ALL_CPUS (-1

Re: [libvirt] [PATCH] virsh: Don't traverse childless nodes in vshNodeIsSuperset

2011-11-28 Thread Michal Privoznik
On 28.11.2011 18:01, Stefan Berger wrote: > On 11/28/2011 11:46 AM, Michal Privoznik wrote: >> If both nodes do not have any children, we pass zero to >> virBitmapAlloc which returns NULL. In turn we report OOM error >> and return false (meaning nodes are different). This is not true. >> --- >> t

[libvirt] [PATCH 2/2] python: Expose binding for virNodeGetMemoryStats()

2011-11-28 Thread Peter Krempa
This patch adds binding for virNodeGetMemoryStats method of libvirtd. Return value is represended as a python dictionary mapping fileld names to values. --- include/libvirt/libvirt.h.in|6 +++- python/libvirt-override-api.xml |7 + python/libvirt-override.c | 48 +++

[libvirt] [PATCH] rpc: Really send non-blocking calls while waiting for another call

2011-11-28 Thread Jiri Denemark
When another thread was dispatching while we wanted to send a non-blocking call, we correctly queued the call and woke up the thread but the thread just threw the call away since it forgot to recheck if its socket was writable. --- src/rpc/virnetclient.c | 10 ++ 1 files changed, 10 inse

[libvirt] [PATCH 1/2] python: Expose binding for virNodeGetCPUStats()

2011-11-28 Thread Peter Krempa
This patch adds binding for virNodeGetCPUStats method of libvirtd. Return value is represended as a python dictionary mapping fileld names to values. --- include/libvirt/libvirt.h.in|6 +++- python/libvirt-override-api.xml |7 + python/libvirt-override.c | 47 ++

Re: [libvirt] libvirt-php 0.4.5 and php 5.4

2011-11-28 Thread Remi Collet
Le 27/11/2011 17:31, Remi Collet a écrit : > Fix is trivial : > s/function_entry/zend_function_entry/ N.B. : zend_function_entry is also available in older php, so this patch will not break build against php 5.3 or 5.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.c

Re: [libvirt] [PATCH] Change security driver APIs to use virDomainDefPtr instead of virDomainObjPtr

2011-11-28 Thread Stefan Berger
On 11/28/2011 12:11 PM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" When sVirt is integrated with the LXC driver, it will be neccessary to invoke the security driver APIs using only a virDomainDefPtr since the lxc_container.c code has no virDomainObjPtr available. Aside from two functio

[libvirt] [libvirt-glib] Ensure 'domain-added' signal on transient domain creation

2011-11-28 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" --- libvirt-gobject/libvirt-gobject-connection.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c index a258847..02b54a1 100644 --- a/libvir

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Srivatsa S. Bhat
On 11/28/2011 05:50 PM, Daniel P. Berrange wrote: > On Mon, Nov 28, 2011 at 05:33:22PM +0530, Srivatsa S. Bhat wrote: >> Add the core functions that implement the functionality of the API. >> Suspend is done by using an asynchronous mechanism so that we can return >> the status to the caller befor

Re: [libvirt] [PATCH libvirt-glib 2/5] Add support for creating watches on streams

2011-11-28 Thread Christophe Fergeau
On Mon, Nov 28, 2011 at 01:13:45PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The GIO GInputStream/GOutputStream async model for I/O does not > work for working with non-blocking bi-directional streams. To > allow that to be done more effectively, add an API to allow > main

Re: [libvirt] [PATCH] rpc: Really send non-blocking calls while waiting for another call

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 06:23:14PM +0100, Jiri Denemark wrote: > When another thread was dispatching while we wanted to send a > non-blocking call, we correctly queued the call and woke up the thread > but the thread just threw the call away since it forgot to recheck if > its socket was writable.

Re: [libvirt] [PATCH libvirt-glib 3/5] Add missing exports of GVirStream APIs

2011-11-28 Thread Christophe Fergeau
ACK On Mon, Nov 28, 2011 at 01:13:46PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > * libvirt-gobject/libvirt-gobject.sym: Export gvir_stream_receive, > gvir_stream_send, gvir_stream_send_all > --- > libvirt-gobject/libvirt-gobject.sym |3 +++ > 1 files changed, 3 ins

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Eric Blake
On 11/28/2011 10:46 AM, Srivatsa S. Bhat wrote: >>> +/* Check if the host supports the requested suspend state */ >>> +switch (state) { >>> +case VIR_NODE_S3: >>> +if (hostPMFeatures & VIR_NODE_S3) { >>> +cmdString = strdup("pm-suspend"); >>> +if (cmdStr

Re: [libvirt] [PATCH libvirt-glib 4/5] Cleanup streams coding style violations

2011-11-28 Thread Christophe Fergeau
ACK On Mon, Nov 28, 2011 at 01:13:47PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > --- > libvirt-gobject/libvirt-gobject-input-stream.c | 39 ++- > libvirt-gobject/libvirt-gobject-input-stream.h | 27 + > libvirt-gobject/libvirt-gobject-ou

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 10:56:33AM -0700, Eric Blake wrote: > On 11/28/2011 10:46 AM, Srivatsa S. Bhat wrote: > > >>> +/* Check if the host supports the requested suspend state */ > >>> +switch (state) { > >>> +case VIR_NODE_S3: > >>> +if (hostPMFeatures & VIR_NODE_S3) { > >>>

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Srivatsa S. Bhat
On 11/28/2011 11:26 PM, Eric Blake wrote: > On 11/28/2011 10:46 AM, Srivatsa S. Bhat wrote: > +/* Check if the host supports the requested suspend state */ +switch (state) { +case VIR_NODE_S3: +if (hostPMFeatures & VIR_NODE_S3) { +cmdString

Re: [libvirt] [PATCH libvirt-glib 2/5] Add support for creating watches on streams

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 06:52:43PM +0100, Christophe Fergeau wrote: > On Mon, Nov 28, 2011 at 01:13:45PM +, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > The GIO GInputStream/GOutputStream async model for I/O does not > > work for working with non-blocking bi-directional st

[libvirt] [PATCH 2/2] nwfilter: Pass the VM operation type into the nwfilter subsystem

2011-11-28 Thread Stefan Berger
Another preparatory patch for DHCP snooping where we want to be able to differentiate between a VM start/interface attach and other operations like VM resume and libvirtd restart so that upon VM start we can internally discard all DHCP leases that may still be active for a VM's interface identified

[libvirt] [PATCH 1/2] nwfilter: Pass the VM's UUID into the nwfilter subsystem

2011-11-28 Thread Stefan Berger
A preparatory patch for DHCP snooping where we want to be able to differentiate between a VM's interface using the tuple of . We assume that MAC addresses could possibly be re-used between different networks (VLANs) thus do not only want to rely on the MAC address to identify an interface. At the

Re: [libvirt] [PATCH libvirt-glib 1/5] Document some of the coding style conventions required

2011-11-28 Thread Christophe Fergeau
On Mon, Nov 28, 2011 at 05:24:56PM +0100, Christophe Fergeau wrote: > On Mon, Nov 28, 2011 at 01:13:44PM +, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > * HACKING: Add notes on coding style conventions > > --- > > HACKING | 221 > > ++

Re: [libvirt] [libvirt-glib 1/2] Add some information about Apple OSs

2011-11-28 Thread Zeeshan Ali (Khattak)
On Mon, Nov 28, 2011 at 11:04 PM, Zeeshan Ali (Khattak) wrote: > From: "Zeeshan Ali (Khattak)" > > Based on a patch from Mateusz Kaplon . Ouch, wrong tag and wrong list. Please ignore. :( -- Regards, Zeeshan Ali (Khattak) FSF member#5124 -- libvir-list mailing list libvir-list@redhat.com h

[libvirt] [libvirt-glib 2/2] Add more OS metadata

2011-11-28 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" - More metadata on Debian, *SUSE, Ubuntu and Windows. - Correct some metadata. Based on a patch from Mateusz Kaplon . --- data/oses/debian.xml | 142 ++ data/oses/opensuse.xml | 200 ++-

[libvirt] [libvirt-glib 1/2] Add some information about Apple OSs

2011-11-28 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" Based on a patch from Mateusz Kaplon . --- data/oses/macos.xml | 94 +++ 1 files changed, 94 insertions(+), 0 deletions(-) create mode 100644 data/oses/macos.xml diff --git a/data/oses/macos.xml b/data/oses/macos.x

Re: [libvirt] [RFC PATCH 0/5] Support online resizing of block devices.

2011-11-28 Thread Eric Blake
On 07/25/2011 11:51 PM, Osier Yang wrote: > This patch series introduce new API "virDomainBlockResize" to expose > qemu monitor command "block_size", which is for resizing the a block > device while the domain is running. > > The prototype for the new API is: > > int > virDomainBlockResiz

Re: [libvirt] [RFC PATCH 0/5] Support online resizing of block devices.

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 02:24:52PM -0700, Eric Blake wrote: > On 07/25/2011 11:51 PM, Osier Yang wrote: > > This patch series introduce new API "virDomainBlockResize" to expose > > qemu monitor command "block_size", which is for resizing the a block > > device while the domain is running. > > > >

[libvirt] [ PATCH v5 0/4] API to invoke S3/S4 on a host and also resume from within libvirt

2011-11-28 Thread Srivatsa S. Bhat
This patchset adds a new API to put a host to a suspended state (Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend) and setup a timed resume to get the host back online, from within libvirt. This uses the RTC wakeup mechanism to set up a timer alarm before suspending the host, so that in-band resum

Re: [libvirt] Associate a LUN as disk with WWNN/WWPN

2011-11-28 Thread Daniel P. Berrange
On Mon, Nov 28, 2011 at 09:01:45AM -0500, Dave Allan wrote: > On Fri, Nov 25, 2011 at 10:49:29AM +, Daniel P. Berrange wrote: > > On Fri, Nov 25, 2011 at 06:42:42PM +0800, Osier Yang wrote: > > > On 2011年11月25日 18:28, Daniel P. Berrange wrote: > > > >On Fri, Nov 25, 2011 at 04:55:02PM +0800, Os

[libvirt] [PATCH v5 2/4] Add the remote protocol implementation for virNodeSuspendForDuration

2011-11-28 Thread Srivatsa S. Bhat
Implement the remote protocol for virNodeSuspendForDuration() API. Signed-off-by: Srivatsa S. Bhat --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 10 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/r

[libvirt] [PATCH v5 1/4] Add a public API to invoke suspend/resume on the host

2011-11-28 Thread Srivatsa S. Bhat
Implement the public definitions for the new API virNodeSuspendForDuration() which will be subsequently used to do a timed suspend on the host. Signed-off-by: Srivatsa S. Bhat --- include/libvirt/libvirt.h.in | 16 +++ src/driver.h |6 src/libvirt.c

[libvirt] [PATCH v5 3/4] Implement the core API to suspend/resume the host

2011-11-28 Thread Srivatsa S. Bhat
Add the core functions that implement the functionality of the API. Suspend is done by using an asynchronous mechanism so that we can return the status to the caller before the host gets suspended. This asynchronous operation is achieved by suspending the host in a separate thread of execution. How

[libvirt] [PATCH v5 4/4] Add virsh command to initiate suspend on the host

2011-11-28 Thread Srivatsa S. Bhat
Add a new command 'nodesuspend' to perform a timed suspend on the host. Signed-off-by: Srivatsa S. Bhat --- tools/virsh.c | 64 +++ tools/virsh.pod |7 ++ 2 files changed, 71 insertions(+), 0 deletions(-) diff --git a/tools/virsh.

Re: [libvirt] Associate a LUN as disk with WWNN/WWPN

2011-11-28 Thread Dave Allan
On Mon, Nov 28, 2011 at 09:41:12PM +, Daniel P. Berrange wrote: > On Mon, Nov 28, 2011 at 09:01:45AM -0500, Dave Allan wrote: > > On Fri, Nov 25, 2011 at 10:49:29AM +, Daniel P. Berrange wrote: > > > On Fri, Nov 25, 2011 at 06:42:42PM +0800, Osier Yang wrote: > > > > On 2011年11月25日 18:28, D

Re: [libvirt] [PATCH 3/8] Implement virDomain{Set, Get}BlockIoTune for the qemu driver

2011-11-28 Thread Lei Li
On 11/28/2011 11:24 PM, Adam Litke wrote: On Wed, Nov 23, 2011 at 10:41:32AM -0700, Eric Blake wrote: Hmm - passing nparams==1 to set just read_bytes_sec has the side effect of wiping out any existing total_iops_sec, even though those two parameters seem somewhat orthogonal, all because we zero

Re: [libvirt] [PATCH] Add 'Hybrid-Suspend' power management discovery for the host

2011-11-28 Thread Daniel Veillard
On Thu, Nov 24, 2011 at 02:22:41PM +0530, Srivatsa S. Bhat wrote: > Some systems support a feature known as 'Hybrid-Suspend', apart from the > usual system-wide sleep states such as Suspend-to-RAM (S3) or Suspend-to-Disk > (S4). Add the functionality to discover this power management feature and >

Re: [libvirt] [PATCH] Add 'Hybrid-Suspend' power management discovery for the host

2011-11-28 Thread Srivatsa S. Bhat
On 11/29/2011 12:37 PM, Daniel Veillard wrote: > On Thu, Nov 24, 2011 at 02:22:41PM +0530, Srivatsa S. Bhat wrote: >> Some systems support a feature known as 'Hybrid-Suspend', apart from the >> usual system-wide sleep states such as Suspend-to-RAM (S3) or Suspend-to-Disk >> (S4). Add the functiona

Re: [libvirt] [PATCH] rpc: Really send non-blocking calls while waiting for another call

2011-11-28 Thread Jiri Denemark
On Mon, Nov 28, 2011 at 17:53:36 +, Daniel P. Berrange wrote: > On Mon, Nov 28, 2011 at 06:23:14PM +0100, Jiri Denemark wrote: > > When another thread was dispatching while we wanted to send a > > non-blocking call, we correctly queued the call and woke up the thread > > but the thread just thr