[libvirt] [PATCH] Fix up a stray whitespace in virHashGrow.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/hash.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/hash.c b/src/hash.c index bde3a0b..9308c0c 100644 --- a/src/hash.c +++ b/src/hash.c @@ -141,7 +141,7 @@ virHashGrow(virHashTablePtr table, int size)

[libvirt] [PATCH] Fix up a whitespace in comments in src/console.c

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/console.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/console.c b/src/console.c index badb62c..4a1a80b 100644 --- a/src/console.c +++ b/src/console.c @@ -78,7 +78,7 @@ int vshRunConsole(const char *tty)

[libvirt] [PATCH] Error path mutex unlock in virGetStorageVol.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/datatypes.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/datatypes.c b/src/datatypes.c index 1889dc3..ac61682 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -863,19 +863,16 @@

[libvirt] [PATCH] Remove unsafe strncpy from esx_vmx.c

2009-08-07 Thread Chris Lalancette
While trying to remove uses of unsafe strncpy in the tree, I came across a couple of usage in the ESX driver. To my eyes, the snprintf replacements do the same thing in less code, and are also safer. This has been compile tested only. Mattias, is there any reason we can't use these simpler (and

[libvirt] [PATCH] Minor cleanup of error path for c_oneVmInfo.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/opennebula/one_client.c | 16 ++-- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/opennebula/one_client.c b/src/opennebula/one_client.c index d1641bf..21f303a 100644 --- a/src/opennebula/one_client.c

[libvirt] [PATCH] Make openvzGetVPSUUID take a len.

2009-08-07 Thread Chris Lalancette
Minor fix to openvzGetVPSUUID to make it take a length parameter. This ensures that it doesn't make assumptions about the length of the UUID buffer, and paves the way for removal of strncpy in the future. Signed-off-by: Chris Lalancette clala...@redhat.com --- src/openvz_conf.c | 10 +-

[libvirt] [PATCH] Fix up a few minor indentation issues.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/xen_internal.c |8 src/xend_internal.c |2 +- src/xm_internal.c |2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xen_internal.c b/src/xen_internal.c index b6bf10d..ae78f84 100644 ---

[libvirt] [PATCH] Remove a duplicated assignment in Xen PCI parsing.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/xm_internal.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/xm_internal.c b/src/xm_internal.c index b7f9e67..71b852e 100644 --- a/src/xm_internal.c +++ b/src/xm_internal.c @@ -1160,7 +1160,6 @@

[libvirt] [PATCH] Fix phyp escape_specialcharacters.

2009-08-07 Thread Chris Lalancette
A couple of minor fixes to phyp escape_specialcharacters. Make it a static function (since it's only used in phyp/phyp_driver.c), and make it take a dstlen parameter. This paves the way for removing strncpy in the future. Signed-off-by: Chris Lalancette clala...@redhat.com ---

[libvirt] [PATCH] Convert one use of strncpy + strcat to snprintf in test driver.

2009-08-07 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/test.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test.c b/src/test.c index 470816b..ab6cfdf 100644 --- a/src/test.c +++ b/src/test.c @@ -417,9 +417,8 @@ static char *testBuildFilename(const char

[libvirt] [PATCH] Remove use of strncpy in qemudExtractMonitorPath.

2009-08-07 Thread Chris Lalancette
qemudExtractMonitorPath() was doing a VIR_ALLOC_N followed by a strncpy. However, this isn't necessary; we can do the same thing using virAsprintf(), which is much safer. Signed-off-by: Chris Lalancette clala...@redhat.com --- src/qemu_driver.c |7 --- 1 files changed, 4 insertions(+),

[libvirt] [PATCH] Introduce virStrcpy.

2009-08-07 Thread Chris Lalancette
Add the virStrcpy function, which takes a dst string, source string, and number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function

[libvirt] [PATCH] Allow libvirtd to RPC to external libvirtd.

2009-08-07 Thread Chris Lalancette
Allow the daemon itself to make RPCs to an external libvirtd, but only if the URI is fully specified. While this isn't used at the moment, it will be for the tunnelled migration support in the future. Signed-off-by: Chris Lalancette clala...@redhat.com --- src/remote_internal.c |2 +- 1

[libvirt] [PATCH] Run 'cont' on successful migration finish.

2009-08-07 Thread Chris Lalancette
As of qemu 0.10.6, qemu now honors the -S flag on incoming migration. That means that when the migration completes, we have to issue a 'cont' command to get the VM running again. We do it unconditionally since it won't hurt on older qemu. Signed-off-by: Chris Lalancette clala...@redhat.com ---

[libvirt] [PATCH] Split virDomainMigrate into functions.

2009-08-07 Thread Chris Lalancette
Re-factor virDomainMigrate to split out the version 1 and version 2 protocols into their own functions. In reality, the two versions share very little in common, so forcing them together in the same function was just confusing. This will also make adding tunnelled migration easier.

[libvirt][PATCH] running libvirt on the latest kvm snapshot

2009-08-07 Thread Anton Protopopov
Hi. Libvirt tryes to extract kvm version from the string QEMU PC emulator version major.minor.micro (kvm-version)... For examle, # kvm -help | head -1 QEMU PC emulator version 0.10.0 (kvm-85), Copyright (c) 2003-2008 Fabrice Bellard The problem occures if you are trying to run it on the

[libvirt] Re: [PATCH] Remove unsafe strncpy from esx_vmx.c

2009-08-07 Thread Matthias Bolte
2009/8/7 Chris Lalancette clala...@redhat.com: While trying to remove uses of unsafe strncpy in the tree, I came across a couple of usage in the ESX driver.  To my eyes, the snprintf replacements do the same thing in less code, and are also safer. This has been compile tested only.  Mattias,

[libvirt] Re: [PATCH] Remove unsafe strncpy from esx_vmx.c

2009-08-07 Thread Chris Lalancette
Matthias Bolte wrote: diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c index af5234e..91a86e2 100644 --- a/src/esx/esx_vmx.c +++ b/src/esx/esx_vmx.c @@ -397,10 +397,7 @@ def-parallels[0]... #define ESX_BUILD_VMX_NAME(_suffix) \ do {

Re: [libvirt][PATCH] running libvirt on the latest kvm snapshot

2009-08-07 Thread Chris Lalancette
Anton Protopopov wrote: Hi. Libvirt tryes to extract kvm version from the string QEMU PC emulator version major.minor.micro (kvm-version)... For examle, # kvm -help | head -1 QEMU PC emulator version 0.10.0 (kvm-85), Copyright (c) 2003-2008 Fabrice Bellard The problem occures if

Re: [libvirt][PATCH] running libvirt on the latest kvm snapshot

2009-08-07 Thread Daniel P. Berrange
On Fri, Aug 07, 2009 at 01:57:34PM +0200, Chris Lalancette wrote: Anton Protopopov wrote: Hi. Libvirt tryes to extract kvm version from the string QEMU PC emulator version major.minor.micro (kvm-version)... For examle, # kvm -help | head -1 QEMU PC emulator version 0.10.0

[libvirt] Project announcement: abiCloud

2009-08-07 Thread Diego Mariño
Hi all, This is a one-time post to announce a project which supports libvirt for managing virtual machines: abiCloud. AbiCloud is an open source cloud platform manager which allows to easily deploy a private cloud in your datacenter. One of the key differences of AbiCloud is the the web rich

Re: [libvirt][PATCH] running libvirt on the latest kvm snapshot

2009-08-07 Thread Chris Lalancette
Daniel P. Berrange wrote: Fix kvm to include a relevant version number instead of just the 'devel' eg, Instead of QEMU PC emulator version 0.10.0 (kvm-devel), Copyright (c) 2003-2008 have QEMU PC emulator version 0.10.0 (kvm-85-devel), Copyright (c) 2003-2008 So that its

Re: [libvirt] Project announcement: abiCloud

2009-08-07 Thread Rakotomandimby Mihamina
08/07/2009 03:13 PM, Diego Mariño: Requirements: - Linux/Windows/MacOSX - Any hypervisor supported installed in a node - Sun Java Runtime Environment (JRE) 1.6 Uh,... not possible to have another langage used? I mean, Python, OCaml,... Licenses - CPAL 1.0 for the UI - MPL 1.1 for the

[libvirt] Power Hypervisor: Fix potential segfault and memleak in phypOpen

2009-08-07 Thread Matthias Bolte
Hi, I came across this line in the phypOpen function: char string[strlen(conn-uri-path)]; Here the path part of the given URI is used without checking it for NULL, this can cause a segfault as strlen expects a string != NULL. Beside that uuid_db and connection_data leak in case of an error. In

Re: [libvirt] error: failed to connect to the hypervisor

2009-08-07 Thread Dominik Klein
Daniel P. Berrange wrote: On Mon, Aug 03, 2009 at 08:56:48AM +0200, Dominik Klein wrote: Hi I am running kvm-78 with libvirt 0.6.1 and see the following error from time to time when my linux-ha cluster tries to run virsh domstate to figure out a virtual machine's state: error: failed to

Re: [libvirt] Project announcement: abiCloud

2009-08-07 Thread Diego Mariño
On Fri, Aug 7, 2009 at 2:29 PM, Rakotomandimby Mihaminamiham...@gulfsat.mg wrote: Requirements: - Linux/Windows/MacOSX - Any hypervisor supported installed in a node - Sun Java Runtime Environment (JRE) 1.6 Uh,... not possible to have another langage used? I mean, Python, OCaml,...

Re: [libvirt] Project announcement: abiCloud

2009-08-07 Thread Daniel P. Berrange
On Fri, Aug 07, 2009 at 02:13:15PM +0200, Diego Mari?o wrote: Hi all, This is a one-time post to announce a project which supports libvirt for managing virtual machines: abiCloud. AbiCloud is an open source cloud platform manager which allows to easily deploy a private cloud in your

Re: [libvirt] Power Hypervisor: Fix potential segfault and memleak in phypOpen

2009-08-07 Thread Chris Lalancette
Matthias Bolte wrote: Hi, I came across this line in the phypOpen function: char string[strlen(conn-uri-path)]; Here the path part of the given URI is used without checking it for NULL, this can cause a segfault as strlen expects a string != NULL. Heh, it's worse than that; there is a

[libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-07 Thread Chris Lalancette
Implement a compressed save image format for qemu. While ideally we would have the choice between compressed/non-compressed available to the libvirt API, unfortunately there is no flags parameter to the virDomainSave() API. Therefore, implement this as a qemu.conf option. Both gzip and bzip2

[libvirt] [PATCH] Fix QEMU domain status after restore.

2009-08-07 Thread Chris Lalancette
When doing a restore, we were forgetting to update the state file for the VM. That means that if you do a save/restore, then shut down libvirtd, then start it back up, you'll see the state of the guest as paused, even though it is really running. We were just forgetting a virDomainSaveStatus

[libvirt] Re: [PATCH] Compressed save image format for Qemu.

2009-08-07 Thread Chris Lalancette
Chris Lalancette wrote: +if (header.compressed == QEMUD_SAVE_FORMAT_RAW) +internalret = virAsprintf(command, migrate \exec: + dd of='%s' oflag=append conv=notrunc 2/dev/null + \, safe_path); +else if

[libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-07 Thread Chris Lalancette
Implement a compressed save image format for qemu. While ideally we would have the choice between compressed/non-compressed available to the libvirt API, unfortunately there is no flags parameter to the virDomainSave() API. Therefore, implement this as a qemu.conf option. Both gzip and bzip2

[libvirt] [PATCH] Support for getting/setting number of cpus in VirtualBox

2009-08-07 Thread Pritesh Kothari
Hi All, I have just added support for getting/setting number of cpus in VirtualBox. The patch for the same is include below. Regards, Pritesh commit 3dcaf67d0bb4aa58c4e2224779bebcf2263068b8 Author: Pritesh Kothari pritesh.koth...@sun.com Date: Fri Aug 7 15:49:16 2009 +0200 libvirt:

Re: [libvirt] [PATCH 12/20] Attach encryption information to virStorageVolDef.

2009-08-07 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: define name='vol' element name='volume' @@ -74,6 +76,7 @@ /optional ref name='format'/ ref name='permissions'/ + ref name='encryption'/ /element /define To allow removal of encryption

Re: [libvirt] [PATCH] Support the usage of socat instead of netcat

2009-08-07 Thread Guido Günther
On Thu, Aug 06, 2009 at 02:37:53PM +0200, Daniel Veillard wrote: On Thu, Aug 06, 2009 at 12:39:34PM +0100, Daniel P. Berrange wrote: On Wed, Aug 05, 2009 at 12:58:33PM +0200, Jonas Eriksson wrote: * src/remote_internal.c: Honour USE_SOCAT by selecting between netcat/nc and socat at

Re: [libvirt][PATCH] running libvirt on the latest kvm snapshot

2009-08-07 Thread Gerrit Slomma
Daniel P. Berrange schrieb: Fix kvm to include a relevant version number instead of just the 'devel' eg, Instead of QEMU PC emulator version 0.10.0 (kvm-devel), Copyright (c) 2003-2008 have QEMU PC emulator version 0.10.0 (kvm-85-devel), Copyright (c) 2003-2008 So that its clear this