[libvirt] [PATCH v3] support setting bandwidth from virsh attach-interface

2011-10-18 Thread Hu Tao
Adds two options, inbound and outbound, to attach-interface to set bandwidth when attaching interfaces --- tools/virsh.c | 89 +- tools/virsh.pod |5 ++- 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH v2] support setting bandwidth from virsh attach-interface(was Re: [PATCH] support setting bandwidth from virsh attach-interface)

2011-10-18 Thread Hu Tao
+/* parse inbound and outbound which are in the format of + * 'average,peak,burst', in which peak and burst are optional, + * thus 'average,,burst' and 'average,peak' are also legal. */ +static int parseRateStr(const char *rateStr, virRatePtr rate) +{ +char *average = NULL, *peak =

[libvirt] [PATCH] virBufferEscapeShell: Fix escaping of single quotes.

2011-10-18 Thread Guido Günther
When checking if we need to escape a single quote we were looking at the character after the quote instead of at the quote itself. --- src/util/buf.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/buf.c b/src/util/buf.c index 7dd9852..2d9499a 100644 ---

[libvirt] [PATCH] compile: fix undefined reference to gnutls_x509_crt_get_dn with gcc-4.6.1

2011-10-18 Thread Xu He Jie
From: soulxu soulxu@soulxu-ThinkPad-T410.(none) When I compile libvirt with gcc-4.6.1 in ubuntu 11.10, got error as below: CCLD libvirtd /usr/bin/ld: ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_migration.o): undefined reference to symbol

Re: [libvirt] [PATCH] Fix VPATH build

2011-10-18 Thread Jiri Denemark
On Mon, Oct 17, 2011 at 09:57:51 -0600, Eric Blake wrote: On 10/17/2011 09:54 AM, Jiri Denemark wrote: probes.h is generated in build directory; setting a dependency on probes.h from source directory doesn't work well in VPATH builds. Caused by commit

Re: [libvirt] [PATCH] qemu: Relax -no-shutdown check to [0.14.0, 0.15.0]

2011-10-18 Thread Jiri Denemark
On Mon, Oct 17, 2011 at 12:39:23 +0200, Michal Privoznik wrote: On 17.10.2011 12:18, Jiri Denemark wrote: The patch that fixes SIGTERM handling with -no-shutdown was taken into 0.15.1 stable release of qemu. --- src/qemu/qemu_capabilities.c |4 ++-- 1 files changed, 2

Re: [libvirt] [PATCH v3 01/13] Define keepalive protocol

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:19AM +0200, Jiri Denemark wrote: The keepalive program has two procedures: PING, and PONG. Both are used only in asynchronous messages and the sender doesn't wait for any reply. However, the party which receives PING messages is supposed to react by sending PONG

Re: [libvirt] [PATCH v3 02/13] Implement common keepalive handling

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:20AM +0200, Jiri Denemark wrote: These APIs are used by both client and server RPC layer to handle processing of keepalive messages. --- Notes: Version 3: - remove ADVERTISE message handling Version 2: - no change po/POTFILES.in

Re: [libvirt] [PATCH v3 03/13] Introduce virConnectSetKeepAlive

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:21AM +0200, Jiri Denemark wrote: virConnectSetKeepAlive public API can be used by a client connecting to remote server to start using keepalive protocol. The API is handled directly by remote driver and not transmitted over the wire to the server. --- Notes:

Re: [libvirt] [PATCH v3 04/13] virsh: Always run event loop

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:22AM +0200, Jiri Denemark wrote: Since virsh already implements event loop, it has to also run it. So far the event loop was only running during virsh console command. --- Notes: Version 3: - new patch tools/console.c | 17 ++---

[libvirt] [PATCH] pci address conflict when virtio disk with drive type address

2011-10-18 Thread Xu He Jie
When using the xml as below: --- devices disk type='file' device='disk' driver name='qemu' type='qcow2'/ source file='/home/soulxu/VM/images/linux.img'/ target dev='hda' bus='virtio'/ address type='drive' controller='0' bus='0' unit='0'/

Re: [libvirt] [PATCH v3 08/13] Implement keepalive protocol in remote driver

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:26AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - remoteStartKeepAlive renamed as remoteSetKeepAlive - clients that implement event loop are required to run it, thus keepalive is enabled if event loop implementation is found without

Re: [libvirt] [PATCH v3 09/13] Introduce virConnectIsAlive API

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:27AM +0200, Jiri Denemark wrote: This API can be used to check if the socket associated with virConnectPtr is still open or it was closed (probably because keepalive protocol timed out). If there the connection is local (i.e., no socket is associated with the

[libvirt] [RFC] Use libssh2 for ssh transport instead of forking ssh process.

2011-10-18 Thread Peter Krempa
The current state of the ssh transport involves starting the ssh client process (command ssh) that communicates using pipes and a socked with the libvirt client. Thereafter it behaves as a standard virNetSocket. This configuration has some drawbacks, but changing the ssh transport to libssh2

Re: [libvirt] [PATCH v3 05/13] Implement keepalive protocol in libvirt daemon

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:23AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - keepalive_supported configuration option can be used to refuse connections from clients that do not support keepalive protocol - explain what keepalive_interval = -1 means - start up

Re: [libvirt] [PATCH v3 10/13] Implement virConnectIsAlive in all drivers

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:28AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - no changes Version 2: - new patch src/esx/esx_driver.c | 18 ++ src/hyperv/hyperv_driver.c | 18 ++ src/libxl/libxl_driver.c |8

Re: [libvirt] [PATCH v3 12/13] qemu: Add support for keepalive messages during p2p migration

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:30AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - explain what keepalive_interval = -1 means - update to client API changes (virConnectAllowKeepAlive dropped and virConnectStartKeepAlive renamed as virConnectSetKeepAlive)

Re: [libvirt] [PATCH v3 13/13] qemu: Cancel p2p migration when connection breaks

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:31AM +0200, Jiri Denemark wrote: If a connection to destination host is lost during peer-to-peer migration (because keepalive protocol timed out), we won't be able to finish the migration and it doesn't make sense to wait for qemu to transmit all data. This patch

Re: [libvirt] [PATCH v3 11/13] Add keepalive support into domain-events examples

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:29AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - update to client API changes (virConnectAllowKeepAlive dropped and virConnectStartKeepAlive renamed as virConnectSetKeepAlive) Version 2: - automatically exit when a connection

Re: [libvirt] [PATCH v3 07/13] Add support for async close of client RPC socket

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:25AM +0200, Jiri Denemark wrote: --- Notes: Version 3: - no changes Version 2: - no changes src/rpc/virnetclient.c | 76 ++-- 1 files changed, 67 insertions(+), 9 deletions(-) ACK

Re: [libvirt] [PATCH v3 06/13] Add support for non-blocking calls in client RPC

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 07:16:24AM +0200, Jiri Denemark wrote: When a client wants to send a keepalive message it needs to do so in a non-blocking way to avoid blocking its event loop. This patch adds dontBlock flag which says that the call should be processed without blocking. Such calls do

Re: [libvirt] [PATCH 03/10] daemon: Subscribe the stream event callback for error events.

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:13PM +0200, Peter Krempa wrote: This patch subscribes the daemon-side event callback for error and hangup events. The functionality to handle them is already implemented in the callback. --- daemon/stream.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [libvirt] [PATCHv2 04/13] virbuf: add auto-indentation support

2011-10-18 Thread Hai Dong Li
On 09/30/2011 12:22 AM, Eric Blake wrote: Rather than having to adjust all callers in a chain to deal with indentation, it is nicer to have virBuffer do auto-indentation. * src/util/buf.h (_virBuffer): Increase size. (virBufferAdjustIndent, virBufferGetIndent): New prototypes. *

Re: [libvirt] [PATCH 05/10] virsh: fix console stream error reporting

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:15PM +0200, Peter Krempa wrote: This patch subscribes the console stream event callback to handle errors (and stream abortion) from the daemon. The functionality was (partly) implemented in the callback, but the error events were not registered. ---

Re: [libvirt] [PATCH 02/10] virnetclientstream: Propagate stream error messages to callback

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:12PM +0200, Peter Krempa wrote: If a stream notification message arives from the daemon side, the event dispatcher only sets the error state for the stream but does not emit the stream error event and the corresponding callback is not called. This patch adds the

Re: [libvirt] [PATCH 08/10] qemu: Add ability to abort existing console while creating new one

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:18PM +0200, Peter Krempa wrote: This patch fixes console corruption, that happens if two concurrent sessions are opened for a single console on a domain. Result of this corruption was, that each of the console streams did recieve just a part of the data written to

Re: [libvirt] [PATCH 01/10] fdstream: Emit stream abort callback even if poll() doesnt.

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:11PM +0200, Peter Krempa wrote: This patch causes the fdstream driver to call the stream event callback if virStreamAbort() is issued on a stream using this driver. This prohibited to abort streams from the daemon, as the daemon remote handler installs a callback

Re: [libvirt] [PATCH 00/10] Console coruption with two or more clients series

2011-10-18 Thread Daniel P. Berrange
On Wed, Oct 12, 2011 at 03:43:10PM +0200, Peter Krempa wrote: This series fixes anoying console corruption if two clients try to connect at same time to the console. The current state of this is, that two/more of libvirt iohelpers are spawned on the same time that compete for data from the

Re: [libvirt] [libvirt-glib 01/23] Add helpers in libvirt-gconfig-helpers.[ch]

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:46AM +0200, Christophe Fergeau wrote: These helper functions will be useful later on. --- examples/Makefile.am |1 + libvirt-gconfig/Makefile.am |3 + libvirt-gconfig/libvirt-gconfig-helpers.c | 179

Re: [libvirt] [libvirt-glib 02/23] gvir_config_object_parse: don't parse empty documents

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:47AM +0200, Christophe Fergeau wrote: Report an error when trying to parse the current XML document associated with the GVirConfig object when no document has been set. --- libvirt-gconfig/libvirt-gconfig-object.c |8 1 files changed, 8

Re: [libvirt] [PATCHv2 04/13] virbuf: add auto-indentation support

2011-10-18 Thread Hai Dong Li
On 09/30/2011 12:22 AM, Eric Blake wrote: Rather than having to adjust all callers in a chain to deal with indentation, it is nicer to have virBuffer do auto-indentation. * src/util/buf.h (_virBuffer): Increase size. (virBufferAdjustIndent, virBufferGetIndent): New prototypes. *

Re: [libvirt] [libvirt-glib 03/23] Add getters for GVirConfig xmlNode and xmlDoc

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:48AM +0200, Christophe Fergeau wrote: They will be useful in subclasses to access the parsed document, and to external users needing to directly interact with the generated XML. --- libvirt-gconfig/libvirt-gconfig-object.c | 18 ++

Re: [libvirt] [libvirt-glib 04/23] Add GVirConfigObject::node property

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:49AM +0200, Christophe Fergeau wrote: This property stores the XML node corresponding to the current configuration object in the XML tree. When creating configuration objects from a XML string, the XML file will be lazily loaded, and this property will be set.

Re: [libvirt] [libvirt-glib 07/23] Add gvir_config_domain_new to create an empty domain

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:52AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 12 libvirt-gconfig/libvirt-gconfig-domain.h |1 + libvirt-gconfig/libvirt-gconfig.sym |1 + 3 files changed, 14 insertions(+), 0 deletions(-)

Re: [libvirt] [libvirt-glib 05/23] Add GVir::Config::Domain::name property

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:50AM +0200, Christophe Fergeau wrote: For now, it's read-only, but is exposed as a gobject property too. --- libvirt-gconfig/libvirt-gconfig-domain.c | 50 ++ libvirt-gconfig/libvirt-gconfig-domain.h |2 +

Re: [libvirt] [libvirt-glib 06/23] Rename gvir_config_domain_new

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:51AM +0200, Christophe Fergeau wrote: Rename it to gvir_config_domain_new_from_xml since it takes an XML string as input. gvir_config_domain_new will be used to create a new empty domain. --- libvirt-gconfig/libvirt-gconfig-domain.c |2 +-

Re: [libvirt] [libvirt-glib 09/23] Make the GVirConfigDomain::name property writable

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:54AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c

Re: [libvirt] [libvirt-glib 10/23] Add gvir_config_object_to_xml

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:55AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-object.c | 19 +++ libvirt-gconfig/libvirt-gconfig-object.h |2 ++ libvirt-gconfig/libvirt-gconfig.sym |1 + 3 files changed, 22 insertions(+), 0

Re: [libvirt] [libvirt-glib 11/23] Use gvir_config_object_to_xml

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:56AM +0200, Christophe Fergeau wrote: s/gvir_config_object_get_doc/gvir_config_object_to_xml/ Prefer gvir_config_object_to_xml over gvir_config_object_get_doc since the latter will be removed soon. --- libvirt-gobject/libvirt-gobject-connection.c |2 +-

Re: [libvirt] [libvirt-glib 08/23] Implement gvir_config_domain_set_name

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:53AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 27 +++ libvirt-gconfig/libvirt-gconfig-domain.h |1 + libvirt-gconfig/libvirt-gconfig.sym |1 + 3 files changed, 29 insertions(+), 0

Re: [libvirt] [libvirt-glib 12/23] Add domain creation/parsing test

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:57AM +0200, Christophe Fergeau wrote: --- configure.ac |1 + libvirt-gconfig/Makefile.am |1 + libvirt-gconfig/tests/Makefile.am | 16 ++ libvirt-gconfig/tests/test-domain-create.c|

Re: [libvirt] [libvirt-glib 13/23] Remove GVirConfigObject::docHandle

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:58AM +0200, Christophe Fergeau wrote: GVirConfigObject also contains an xmlNodePtr which is more useful since it indicates the position of the current config object in the source XML file. Since xmlNode has a 'doc' member, having both an xmlNodePtr and an

Re: [libvirt] [libvirt-glib 14/23] Remove xml parsing from gvir_config_*_new functions

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:40:59AM +0200, Christophe Fergeau wrote: These functions now create empty config objects to be consistent with what gvir_config_domain_new does. --- libvirt-gconfig/libvirt-gconfig-capabilities.c| 10 -- libvirt-gconfig/libvirt-gconfig-capabilities.h

Re: [libvirt] [libvirt-glib 15/23] Only do XML parsing when creating config objects

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:00AM +0200, Christophe Fergeau wrote: This commit changes gvir_config_domain_new_from_xml not to operate on an existing object. This makes it possible to call it to create an appropriate xmlNodePtr object which can then be used to construct an object derived from

Re: [libvirt] [libvirt-glib 17/23] Remove GVirConfigObject::doc

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:02AM +0200, Christophe Fergeau wrote: Now that the parsing is done before creating the object, this member is no longer useful. Moreover, it's redundant with the ::node member. Remove it and rely on always having an xmlNodePtr available to represent the config

Re: [libvirt] [libvirt-glib 16/23] Remove GError argument from GVirConfigObject::node getter

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:01AM +0200, Christophe Fergeau wrote: Since this function no longer tries to do XML parsing, there is no error to report. --- libvirt-gconfig/libvirt-gconfig-domain.c |5 ++--- libvirt-gconfig/libvirt-gconfig-object.c |7 +++

Re: [libvirt] [libvirt-glib 19/23] Add gvir_config_object_set_node_content

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:04AM +0200, Christophe Fergeau wrote: It's used to set the content of a node in a GVirConfigObject to a given value, and will replace any existing node with the same value. --- libvirt-gconfig/libvirt-gconfig-domain.c | 22 ++

Re: [libvirt] [libvirt-glib 18/23] Add gvir_config_object_get_node_content

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:03AM +0200, Christophe Fergeau wrote: There will be quite a few getter functions returning a string contained in one of the nodes of a GVirConfigObject, so better to make it a one-liner to achieve this. --- libvirt-gconfig/libvirt-gconfig-domain.c |9

Re: [libvirt] [libvirt-glib 20/23] Add test-domain-duplicate.xml which currently fails

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:05AM +0200, Christophe Fergeau wrote: This test has 3 duplicate name nodes in the domain XML, I don't know what the right behaviour is in this case :) Well first of all this is obviously a non-conforming XML document, so if the application is using the schema

Re: [libvirt] [libvirt-glib 22/23] Add GVirConfigDomain::memory

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:07AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 29 + libvirt-gconfig/libvirt-gconfig-domain.h |2 + libvirt-gconfig/libvirt-gconfig-object.c | 32

Re: [libvirt] [libvirt-glib 23/23] Add GVirConfigDomain::features

2011-10-18 Thread Daniel P. Berrange
On Fri, Oct 07, 2011 at 11:41:08AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 71 libvirt-gconfig/libvirt-gconfig-domain.h |4 ++ libvirt-gconfig/libvirt-gconfig.sym|2 +

Re: [libvirt] [PATCH 00/10] Console coruption with two or more clients series

2011-10-18 Thread Peter Krempa
On 10/18/2011 12:34 PM, Daniel P. Berrange wrote: On Wed, Oct 12, 2011 at 03:43:10PM +0200, Peter Krempa wrote: This series fixes anoying console corruption if two clients try to connect at same time to the console. The current state of this is, that two/more of libvirt iohelpers are spawned on

Re: [libvirt] [PATCH 08/10] qemu: Add ability to abort existing console while creating new one

2011-10-18 Thread Peter Krempa
On 10/18/2011 12:23 PM, Daniel P. Berrange wrote: Hmm, I have a feeling this will cause a leak. Currently the virStreamPtr reference is held by the daemon itself, and when the client disconnects it free's the stream. With this extra reference held by the QEMU driver, the virStreamPtr will live

Re: [libvirt] [libvirt-glib 13/23] Remove GVirConfigObject::docHandle

2011-10-18 Thread Christophe Fergeau
On Tue, Oct 18, 2011 at 12:44:27PM +0100, Daniel P. Berrange wrote: -if (priv-docHandle) -xmlFreeDoc(priv-docHandle); +/* FIXME: all objects describing a given XML document will share the + * same document so we can't destroy it here like this, we need some + *

Re: [libvirt] [libvirt-glib 02/23] gvir_config_object_parse: don't parse empty documents

2011-10-18 Thread Christophe Fergeau
On Tue, Oct 18, 2011 at 12:07:43PM +0100, Daniel P. Berrange wrote: Seeing this string message reminds me that we should add I18N gettext support to this library sometime soon. Yep, I'm thinking about this from time to time too :) Christophe pgpYi4GzxOjlF.pgp Description: PGP signature --

Re: [libvirt] [libvirt-glib 04/23] Add GVirConfigObject::node property

2011-10-18 Thread Christophe Fergeau
On Tue, Oct 18, 2011 at 12:32:33PM +0100, Daniel P. Berrange wrote: On Fri, Oct 07, 2011 at 11:40:49AM +0200, Christophe Fergeau wrote: @@ -277,6 +306,8 @@ const gchar *gvir_config_object_get_schema(GVirConfigObject *config) } /* NB: the xmlDocPtr must not be freed by the caller */

Re: [libvirt] [libvirt-glib 08/23] Implement gvir_config_domain_set_name

2011-10-18 Thread Christophe Fergeau
On Tue, Oct 18, 2011 at 12:39:34PM +0100, Daniel P. Berrange wrote: On Fri, Oct 07, 2011 at 11:40:53AM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain.c | 27 +++ libvirt-gconfig/libvirt-gconfig-domain.h |1 +

Re: [libvirt] [PATCH] Add AHCI support to qemu driver

2011-10-18 Thread Adam Litke
On Mon, Oct 17, 2011 at 02:08:42PM -0600, Jim Fehlig wrote: Hi Adam, I've been traveling, sorry for the delay... With the following config, I end up booting from the cdrom. If I take away the cdrom definition completely, I am unable to boot at all. I can boot fine with your

Re: [libvirt] [libvirt-glib 20/23] Add test-domain-duplicate.xml which currently fails

2011-10-18 Thread Christophe Fergeau
On Tue, Oct 18, 2011 at 12:50:44PM +0100, Daniel P. Berrange wrote: On Fri, Oct 07, 2011 at 11:41:05AM +0200, Christophe Fergeau wrote: This test has 3 duplicate name nodes in the domain XML, I don't know what the right behaviour is in this case :) Well first of all this is obviously a

Re: [libvirt] [libvirt-glib 04/23] Add GVirConfigObject::node property

2011-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2011 at 02:43:10PM +0200, Christophe Fergeau wrote: On Tue, Oct 18, 2011 at 12:32:33PM +0100, Daniel P. Berrange wrote: On Fri, Oct 07, 2011 at 11:40:49AM +0200, Christophe Fergeau wrote: @@ -277,6 +306,8 @@ const gchar *gvir_config_object_get_schema(GVirConfigObject

Re: [libvirt] Compiler warnings

2011-10-18 Thread Wen Congyang
On 10/18/2011 10:02 AM, Wen Congyang wrote: At 10/18/2011 01:03 AM, Eric Blake Write: On 10/17/2011 10:17 AM, Alex Jia wrote: Eric, It's latest libvirt upstream, current commit id is commit 0a71c79. # rpm -q glibc glibc-2.12-1.42.el6.x86_64 430 if (strchr(toescape, *cur))

Re: [libvirt] Compiler warnings

2011-10-18 Thread Wen Congyang
On 10/17/2011 11:35 PM, Alex Jia wrote: Hi all, I meet the following compiler warnings today: .. CC libvirt_util_la-buf.lo util/buf.c: In function 'virBufferEscape': util/buf.c:430: warning: logical '' with non-zero constant will always evaluate as true [-Wlogical-op] CC

Re: [libvirt] Compiler warnings

2011-10-18 Thread Eric Blake
On 10/18/2011 07:21 AM, Wen Congyang wrote: I meet another warnings, but it does not break the buildings: CCLD libvirt_driver_remote.la CCLD libvirt.la CCLD libvirt_test.la *** Warning: Linking the shared library libvirt_test.la against the non-libtool *** objects probes.o is not portable!

Re: [libvirt] [PATCH] virBufferEscapeShell: Fix escaping of single quotes.

2011-10-18 Thread Guido Günther
On Tue, Oct 18, 2011 at 08:39:48AM -0600, Eric Blake wrote: On 10/18/2011 01:31 AM, Guido Günther wrote: When checking if we need to escape a single quote we were looking at the character after the quote instead of at the quote itself. --- src/util/buf.c |4 ++-- 1 files changed, 2

Re: [libvirt] [PATCH] compile: Add a missing function 'pciDeviceListFind' to libvirt_private.syms

2011-10-18 Thread Wen Congyang
On 10/18/2011 10:46 AM, Xu He Jie wrote: compile error: ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_hostdev.o): In function `qemuPrepareHostdevPCIDevices': /home/soulxu/data/work-code/libvirt/src/qemu/qemu_hostdev.c:183: undefined reference to `pciDeviceListFind'

Re: [libvirt] [PATCH] compile: fix undefined reference to gnutls_x509_crt_get_dn with gcc-4.6.1

2011-10-18 Thread Eric Blake
On 10/18/2011 02:06 AM, Xu He Jie wrote: From: soulxusoulxu@soulxu-ThinkPad-T410.(none) When I compile libvirt with gcc-4.6.1 in ubuntu 11.10, got error as below: CCLD libvirtd /usr/bin/ld: ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_migration.o): undefined reference

Re: [libvirt] [PATCH] pci address conflict when virtio disk with drive type address

2011-10-18 Thread Eric Blake
On 10/18/2011 03:30 AM, Xu He Jie wrote: When using the xml as below: memballoon model='virtio' address type='pci' domain='0x' bus='0x00' slot='0x04' function='0x0'/ /memballoon /devices - Then can't statup qemu, the error message as

Re: [libvirt] [RFC] Use libssh2 for ssh transport instead of forking ssh process.

2011-10-18 Thread Matthias Witte
Hi Peter, Disadvantages: - break configurations for users that use advanced ssh configurations in the ssh client config file Whenever I had a look at native ssh libraries in Perl or Python I found GSSAPIAuthentication was not supported. My favorite ist solution one, a new transport option

Re: [libvirt] [PATCH] Add AHCI support to qemu driver

2011-10-18 Thread Adam Litke
On Tue, Oct 18, 2011 at 07:49:11AM -0500, Adam Litke wrote: On Mon, Oct 17, 2011 at 02:08:42PM -0600, Jim Fehlig wrote: Hi Adam, I've been traveling, sorry for the delay... With the following config, I end up booting from the cdrom. If I take away the cdrom definition

Re: [libvirt] [RFC] Use libssh2 for ssh transport instead of forking ssh process.

2011-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2011 at 11:29:46AM +0200, Peter Krempa wrote: The current state of the ssh transport involves starting the ssh client process (command ssh) that communicates using pipes and a socked with the libvirt client. Thereafter it behaves as a standard virNetSocket. This configuration

Re: [libvirt] [PATCH] virBufferEscapeShell: Fix escaping of single quotes.

2011-10-18 Thread Eric Blake
On 10/18/2011 01:31 AM, Guido Günther wrote: When checking if we need to escape a single quote we were looking at the character after the quote instead of at the quote itself. --- src/util/buf.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ACK, and sorry for missing that

Re: [libvirt] [PATCH] Allow for URI aliases when connecting to libvirt

2011-10-18 Thread Daniel P. Berrange
On Thu, Oct 13, 2011 at 09:24:49AM -0600, Eric Blake wrote: On 10/13/2011 04:53 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com I finally got fed up of typing URIs when using virsh This adds support for a libvirt client configuration file either

Re: [libvirt] [PATCH v3 10/13] Implement virConnectIsAlive in all drivers

2011-10-18 Thread Matthias Bolte
2011/10/12 Jiri Denemark jdene...@redhat.com: --- Notes:    Version 3:    - no changes    Version 2:    - new patch  src/esx/esx_driver.c       |   18 ++  src/hyperv/hyperv_driver.c |   18 ++  src/libxl/libxl_driver.c   |    8  

Re: [libvirt] [PATCH v3 10/13] Implement virConnectIsAlive in all drivers

2011-10-18 Thread Matthias Bolte
2011/10/18 Matthias Bolte matthias.bo...@googlemail.com: 2011/10/12 Jiri Denemark jdene...@redhat.com: --- Notes:    Version 3:    - no changes    Version 2:    - new patch  src/esx/esx_driver.c       |   18 ++  src/hyperv/hyperv_driver.c |   18 ++  

Re: [libvirt] [PATCH libvirt-snmp 0/3] fix problems found by coverity

2011-10-18 Thread Eric Blake
On 10/18/2011 11:13 AM, Laine Stump wrote: These three problems were found by coverity during the run documented here: https://bugzilla.redhat.com/show_bug.cgi?id=732015 The three fixes are all very simple, but sufficiently unrelated (other than the method used for finding them) to

[libvirt] [PATCH libvirt-snmp 0/3] fix problems found by coverity

2011-10-18 Thread Laine Stump
These three problems were found by coverity during the run documented here: https://bugzilla.redhat.com/show_bug.cgi?id=732015 The three fixes are all very simple, but sufficiently unrelated (other than the method used for finding them) to warrant separate patches. -- libvir-list mailing

[libvirt] [PATCH libvirt-snmp 1/3] allocate enough space for trailing NULL in string

2011-10-18 Thread Laine Stump
This bug was found by coverity. See: https://bugzilla.redhat.com/show_bug.cgi?id=732015 --- src/libvirtGuestTable_data_get.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/libvirtGuestTable_data_get.c b/src/libvirtGuestTable_data_get.c index 2430f9c..cc31e9e

[libvirt] [PATCH libvirt-snmp 3/3] fix startup logic for selecting stderr vs syslog

2011-10-18 Thread Laine Stump
This bug was uncovered by coverity during the run that resulted in the filing of the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=732015 use_syslog was initialized to 0, and then if the Use stderr option was selected, it was set to ... 0! Rather than simply initializing to 1, I

[libvirt] [PATCH libvirt-snmp 2/3] eliminate bogus check for NULL array

2011-10-18 Thread Laine Stump
This is another bug found by coverity in: https://bugzilla.redhat.com/show_bug.cgi?id=732015 Apparently libvirtGuestUUID was originally a pointer, and the code was making sure that it had memory allocated, but now it is an array that is contained in the structure, so checking for NULL makes

[libvirt] [PATCH 2/3] Use virBufferEscapeShell in cmdEcho

2011-10-18 Thread Guido Günther
--- tools/virsh.c | 39 ++- 1 files changed, 18 insertions(+), 21 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 54684f6..d45baa6 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -12322,7 +12322,7 @@ static const vshCmdOptDef opts_echo[] = {

[libvirt] [PATCH 3/3] qemu: replace qemuMonitorEscapeShell by virBufferEscapeShell

2011-10-18 Thread Guido Günther
--- src/qemu/qemu_monitor.c | 49 -- src/qemu/qemu_monitor.h |1 - 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c9dd69e..182e63d 100644 --- a/src/qemu/qemu_monitor.c +++

[libvirt] [PATCH 1/3] virBufferEscapeShell: Emit quotes for the empty string

2011-10-18 Thread Guido Günther
Make the empty string return '' to match cmdEcho's behavior. --- src/util/buf.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/util/buf.c b/src/util/buf.c index f582cd2..b7fcf6d 100644 --- a/src/util/buf.c +++ b/src/util/buf.c @@ -507,15 +507,20 @@

[libvirt] [PATCH 1/2] qemu: Fix name-space handling

2011-10-18 Thread Philipp Hahn
The XML parser for the qemu specific extensions expects the qemu name-space to be bound to the 'qemu' prefix. This is too strict, since the name of the name-space-prefix is only mend as an internal lookup key. Only the associated URI is relevant. domain... qemu:commandline

Re: [libvirt] [PATCH] virNetSocketNewConnectSSH: Escape netcat path too

2011-10-18 Thread Guido Günther
On Fri, Oct 14, 2011 at 08:28:48AM -0600, Eric Blake wrote: On 10/14/2011 06:18 AM, Guido Günther wrote: What holds for netcat is also true for the socket path since it can be part of the connection URI as well. Make both subject to the same amount of shell parsing. Hmm, I'm not sure about

[libvirt] [PATCH 2/2] qemu: Test name-space handling

2011-10-18 Thread Philipp Hahn
Add test cases for parsing the qemu-name-space. This is based on qemuxml2argv{test,data/}, but can not reside in qemuxml2argv{test,data/} because ... 1. qemuxmlns-qemu-ns-domain.xml is not schema-valid and breaks domainschematest. The test is still important to detect xmlns:qemu bindings to a

[libvirt] [PATCH 0/3] Consolidate shell escape functions

2011-10-18 Thread Guido Günther
The attached patches use virBufferEscapeShell in virsh's virCmd and eliminate qemuMonitorEscapeShell so we have only one function that does the shell escaping. Cheers, -- Guido Guido Günther (3): virBufferEscapeShell: Emit quotes for the empty string Use virBufferEscapeShell in cmdEcho

[libvirt] [PATCH] documentation: trivial spelling fix

2011-10-18 Thread Philipp Hahn
Signed-off-by: Philipp Hahn h...@univention.de --- docs/formatdomain.html.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c007dff..4a75026 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [libvirt PATCH] support continue/return targets in nwfilter

2011-10-18 Thread David L Stevens
This patch adds support for continue and return actions in filter rules. Signed-off-by: David L Stevens dlstev...@us.ibm.com diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 04bfa22..3e28806 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@

Re: [libvirt] [PATCH 3/3] qemu: replace qemuMonitorEscapeShell by virBufferEscapeShell

2011-10-18 Thread Eric Blake
On 10/18/2011 01:36 PM, Guido Günther wrote: --- src/qemu/qemu_monitor.c | 49 -- src/qemu/qemu_monitor.h |1 - 2 files changed, 5 insertions(+), 45 deletions(-) ACK, and nice diffstat ratio. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 1/3] virBufferEscapeShell: Emit quotes for the empty string

2011-10-18 Thread Eric Blake
On 10/18/2011 01:35 PM, Guido Günther wrote: Make the empty string return '' to match cmdEcho's behavior. --- src/util/buf.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library

Re: [libvirt] [PATCH 2/3] Use virBufferEscapeShell in cmdEcho

2011-10-18 Thread Eric Blake
On 10/18/2011 01:35 PM, Guido Günther wrote: --- tools/virsh.c | 39 ++- 1 files changed, 18 insertions(+), 21 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list

[libvirt] [PATCH] snapshot: detect when qemu lacks disk-snapshot support

2011-10-18 Thread Eric Blake
Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use the just-created 0-byte file, rendering the domain broken on restart. * src/qemu/qemu_monitor_text.c

Re: [libvirt] [PATCH] snapshot: detect when qemu lacks disk-snapshot support

2011-10-18 Thread Eric Blake
On 10/18/2011 03:51 PM, Eric Blake wrote: Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use the just-created 0-byte file, rendering the domain broken on

[libvirt] [PATCHv2] snapshot: detect when qemu lacks disk-snapshot support

2011-10-18 Thread Eric Blake
Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use the just-created 0-byte file, rendering the domain broken on restart. * src/qemu/qemu_monitor_text.c

Re: [libvirt] [PATCHv2] snapshot: detect when qemu lacks disk-snapshot support

2011-10-18 Thread Eric Blake
On 10/18/2011 05:31 PM, Dave Allan wrote: On Tue, Oct 18, 2011 at 04:04:57PM -0600, Eric Blake wrote: Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use

Re: [libvirt] [PATCHv2] snapshot: detect when qemu lacks disk-snapshot support

2011-10-18 Thread Dave Allan
On Tue, Oct 18, 2011 at 04:04:57PM -0600, Eric Blake wrote: Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use the just-created 0-byte file, rendering

Re: [libvirt] [PATCH 1/1] lxc: use our own hand-rolled code in place of unlockpt and grantpt (v2)

2011-10-18 Thread Serge E. Hallyn
Quoting Eric Blake (ebl...@redhat.com): [but we still have to fix the hard-coding of gid=5 in the mount() option]. I missed something - why do we have to fix that? We don't have to fix it now, but we should fix it someday. There's nothing that says a distro has to map 'tty' to gid 5, and

Re: [libvirt] [PATCH 1/1] lxc: use our own hand-rolled code in place of unlockpt and grantpt (v2)

2011-10-18 Thread Serge E. Hallyn
New version, compile-tested only tonight. I followed the suggestion about using posix_openpt(), though its manpage worries me - does libvirt need to compile on any platforms that don't have that fn? (In which case we can add the trivial define if we need to, but...) Subject: [PATCH 1/1] lxc:

Re: [libvirt] [PATCH] compile: fix undefined reference to gnutls_x509_crt_get_dn with gcc-4.6.1

2011-10-18 Thread Xu He Jie
于 2011年10月18日 22:45, Eric Blake 写道: On 10/18/2011 02:06 AM, Xu He Jie wrote: From: soulxusoulxu@soulxu-ThinkPad-T410.(none) When I compile libvirt with gcc-4.6.1 in ubuntu 11.10, got error as below: CCLD libvirtd /usr/bin/ld:

Re: [libvirt] [PATCH] pci address conflict when virtio disk with drive type address

2011-10-18 Thread Xu He Jie
于 2011年10月18日 22:52, Eric Blake 写道: On 10/18/2011 03:30 AM, Xu He Jie wrote: When using the xml as below: memballoon model='virtio' address type='pci' domain='0x' bus='0x00' slot='0x04' function='0x0'/ /memballoon /devices - Then can't statup qemu, the

  1   2   >