Re: [libvirt] [PATCH] - added mapping to Network object - added implementation of select networking functions - virsh net-list and net-info commands now work for esx

2011-04-12 Thread Matthias Bolte
Long summary line. You could reformat it like this: esx: Support virsh net-list and net-info Add mapping of Network object and implementation of select networking functions. This makes virsh net-list and net-info commands work for ESX. 2011/4/12 jbarkley : > From: jbarkely You should tell g

[libvirt] Is there smt missing at Java bindings?

2011-04-12 Thread kadir yĆ¼ceer
Hello all, I've been posting questions about my issue to the user list but it seems nobody can answer, so I had to try this list, sorry if there is any disturbance. Here is the case: I've been trying to develop a java app that can register callbacks for domain lifecycle events(suspend,resume,etc.

Re: [libvirt] [PATCH] virsh: Add --name and --description options to snapshot-create

2011-04-12 Thread Daniel Veillard
On Mon, Apr 11, 2011 at 11:36:00AM -0600, Eric Blake wrote: > On 04/10/2011 05:31 AM, Matthias Bolte wrote: > > This options are shortcuts to set name and description of a snapshot. > > > > Suggested by Elias Probst > > --- > > > > I'm not sure if this is be best approach. In case of the vol-* co

Re: [libvirt] [PATCH] esx: Extend VI generator to cover managed object types

2011-04-12 Thread Daniel Veillard
On Sun, Apr 10, 2011 at 01:27:56PM +0200, Matthias Bolte wrote: > Generate lookup functions for managed object types. > --- > src/esx/esx_vi.c | 414 > +++- > src/esx/esx_vi.h |2 + > src/esx/esx_vi_generator.input | 28 +++- >

[libvirt] Time to think about the next release 0.9.1

2011-04-12 Thread Daniel Veillard
I think keeping with the monthly schedule for new release is a good thing considering the current amount of changes and patches being pushed. So if we plan 0.9.1 by the month end, this means entering freeze around the week-end of the 23rd, i.e. in 10 days, a rough estimate is that the new release

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

2011-04-12 Thread Lai Jiangshan
--- src/qemu/qemu_driver.c | 42 ++ src/qemu/qemu_monitor.c | 14 ++ src/qemu/qemu_monitor.h |2 ++ src/qemu/qemu_monitor_json.c | 29 + src/qemu/qemu_monitor_json.h |1 + src/qemu/qemu

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

2011-04-12 Thread Lai Jiangshan
--- tools/virsh.c | 36 tools/virsh.pod |4 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2e35021..5e3df8a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2919,6 +2919,41 @@ cmdSetvcpus(vs

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

2011-04-12 Thread Lai Jiangshan
--- src/driver.h |4 src/esx/esx_driver.c |1 + src/libxl/libxl_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/phyp/phyp_driver.c |3 ++- src/qemu/qemu_driver.c |1 + src/remote/remote_driver.c |

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

2011-04-12 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 +++ b/include/libvirt

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

2011-04-12 Thread Lai Jiangshan
--- daemon/remote.c | 26 ++ daemon/remote_dispatch_args.h |1 + daemon/remote_dispatch_prototypes.h |8 daemon/remote_dispatch_table.h |5 + src/remote/remote_driver.c | 24 src

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

2011-04-12 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 0da9885..56996f9 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -5214,6 +5214,50 @@ error: } /** + * virDomainInjectNM

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

2011-04-12 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 inj

[libvirt] [libvirt-php] Fix get_xml when xpath is null

2011-04-12 Thread Lyre
Hi all: To my surprise, it seems that passing null to php as a string parameter, will set the pointer which retrive it to an empty string "" , but not NULL. get_xml_from_xpath() doesn't work correctly since an empty string is passed as the xpath argument, and libxml will complain "Invalid

Re: [libvirt] [PATCHv9 0/4] persistent device modification for qemu

2011-04-12 Thread KAMEZAWA Hiroyuki
Sorry, CC list was wrong. remove "hugh.dick...@tiscali.co.uk" from CC if you reply.. Thanks, -Kame -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCHv9 4/4] libvirt/qemu - check address confliction before addition.

2011-04-12 Thread KAMEZAWA Hiroyuki
qemuDomainAttachDevicePersistent() calls qemuDomainAssignPCIAddresses() and virDomainDefAddImplicitControllers() at the end of its call. But PCI/Drive address confliction checks are PCI - confliction will be found but error report is not verbose. Drive - never done. For example, when adding a

[libvirt] [PATCHv9 2/4] libvirt/qemu - keep consistency at persistent modification.

2011-04-12 Thread KAMEZAWA Hiroyuki
At persistent modification of inactive domains, we go several steps as - insert disk to vmdef - assign controller if necessary - assign pci address if necessary - save it to file If failure happens in above sequence, we need to keep consistency between vmdef on cache and XML in the file.

[libvirt] [PATCHv9 3/4] libvirt/qemu - support persistent disk modification

2011-04-12 Thread KAMEZAWA Hiroyuki
support changes of disks by VIR_DOMAIN_DEVICE_MODIFY_CONFIG for qemu. Signed-off-by: KAMEZAWA Hiroyuki Changelog: v8->v9 updated comments --- src/conf/domain_conf.c | 22 ++ src/conf/domain_conf.h |2 ++ src/libvirt_private.syms |2 ++ src/qemu/qemu_driver.c

[libvirt] [PATCHv9 1/4] libvirt/qemu - persistent modification of devices.

2011-04-12 Thread KAMEZAWA Hiroyuki
Now, qemudDomainAttachDeviceFlags() and qemudDomainDetachDeviceFlags() doesn't support VIR_DOMAIN_DEVICE_MODIFY_CONFIG. By this, virsh's at(de)tatch-device --persistent cannot modify qemu config. (Xen allows it.) This patch is a base patch for adding support of devices in step by step manner. Fol

[libvirt] [PATCHv9 0/4] persistent device modification for qemu

2011-04-12 Thread KAMEZAWA Hiroyuki
Updated against the latest git tree, no major changes since a week ago. Thank you for reviews in previous ones. Purpose of patches: Now, virsh at(de)tach-device/disk/...etc.. doesn't support to update inactive domain's definition even with the --persistent flag. To update persistent modific

Re: [libvirt] [PATCH 3/6] use virObject to manage reference-count of virDomainObj

2011-04-12 Thread Wen Congyang
At 04/12/2011 06:40 PM, Daniel P. Berrange Write: > On Tue, Apr 12, 2011 at 06:33:21PM +0800, Hu Tao wrote: >> On Tue, Apr 12, 2011 at 06:22:12PM +0800, Wen Congyang wrote: >>> At 04/12/2011 01:51 PM, Hu Tao Write: Sorry, I unexpectedly deleted text body. I changed the code like this

Re: [libvirt] [PATCH 3/6] Introduce yet another migration version in API.

2011-04-12 Thread Eric Blake
On 02/09/2011 09:58 AM, Daniel P. Berrange wrote: > This patch attempts to introduce a version 3 that uses the > improved 5 step sequence > > * Src: Begin > - Generate XML to pass to dst > - Generate optional cookie to pass to dst > > * Dst: Prepare > - Get ready

[libvirt] [PATCH 3/2] tests: test recent virsh option parsing changes

2011-04-12 Thread Eric Blake
* tests/virsh-optparse: New file. * tests/Makefile.am (test_scripts): Use it. --- Hmm, I'd better take my own advice and test this stuff :) tests/Makefile.am|1 + tests/virsh-optparse | 70 ++ 2 files changed, 71 insertions(+), 0 deletion

[libvirt] [PATCH 2/2] virsh: fix regression in parsing optional integer

2011-04-12 Thread Eric Blake
Regression introduced in 0.8.5, commit c1564268. The command 'virsh freecell 0' quit working when it changed from an optional string to an optional integer. This patch introduces a slight change that specifying an option twice is now detected as an error. * tools/virsh.c (vshCmddefGetData, vshCm

[libvirt] [PATCH 1/2] virsh: list required options first

2011-04-12 Thread Eric Blake
The current state of virsh parsing is that: all lookup the volume by path (technically, the last two also attempt a name lookup within a pool, whereas the first skips that step, but the end result is the same); meanwhile: complains about unexpected data. Why? Because the --pool option is option

[libvirt] [PATCH 0/2] virsh: improve option parsing, including a regression fix

2011-04-12 Thread Eric Blake
I wish I could have come up with something with fewer lines of code changed; but I'm at least happy that the end result only touched vshCommandParse and its helper functions rather than having to touch lots of existing commands. This fixes multiple bugs: a regression in 'virsh freecell 0' parsing,

Re: [libvirt] [PATCH] virsh: Fix a problem of argv parsing

2011-04-12 Thread Eric Blake
On 04/05/2011 06:38 AM, Osier Yang wrote: > Problem example: > # virsh -d 5 vol-create --pool default col.xml > vol-create: pool(optdata): default > vol-create: pool(optdata): col.xml > error: command 'vol-create' requires option > > It gets same "vshCmdOptDef" for both "--pool default"

Re: [libvirt] [PATCH v2] util: Simplify hash implementation

2011-04-12 Thread Eric Blake
On 04/12/2011 11:25 AM, Jiri Denemark wrote: > So far first entries for each hash key are stored directly in the hash > table while other entries mapped to the same key are linked through > pointers. As a result of that, the code is cluttered with special > handling for the first items. > > This p

Re: [libvirt] [PATCH] util: Fix crash when removing entries during hash iteration

2011-04-12 Thread Jiri Denemark
On Tue, Apr 12, 2011 at 11:06:17 -0600, Eric Blake wrote: > On 04/12/2011 10:54 AM, Jiri Denemark wrote: > > Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possible to > > remove current entry when iterating through all hash entries. However, > > it didn't properly handle a special case of

[libvirt] [PATCH v2] util: Simplify hash implementation

2011-04-12 Thread Jiri Denemark
So far first entries for each hash key are stored directly in the hash table while other entries mapped to the same key are linked through pointers. As a result of that, the code is cluttered with special handling for the first items. This patch makes all entries (even the first ones) linked throu

Re: [libvirt] [PATCH] util: Fix crash when removing entries during hash iteration

2011-04-12 Thread Eric Blake
On 04/12/2011 10:54 AM, Jiri Denemark wrote: > Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possible to > remove current entry when iterating through all hash entries. However, > it didn't properly handle a special case of removing first entry > assigned to a given key which contains sev

[libvirt] [PATCH] util: Fix crash when removing entries during hash iteration

2011-04-12 Thread Jiri Denemark
Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possible to remove current entry when iterating through all hash entries. However, it didn't properly handle a special case of removing first entry assigned to a given key which contains several entries in its collision list. --- This is an al

[libvirt] [PATCH] util: Simplify hash implementation

2011-04-12 Thread Jiri Denemark
So far first entries for each hash key are stored directly in the hash table while other entries mapped to the same key are linked through pointers. As a result of that, the code is cluttered with special handling for the first items. Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possibl

[libvirt] RFC: disconnecting guest/domain interface config from host config (aka migration with macvtap)

2011-04-12 Thread Laine Stump
Abstraction of guest <--> host network connection in libvirt = The element of a guest's domain config in libvirt has a element that describes what resources on a host will be used to connect the guest's network interface to the rest of the world. This is v

Re: [libvirt] [PATCH] Fix possible infinite loop in remote driver

2011-04-12 Thread Eric Blake
On 04/12/2011 09:12 AM, Daniel P. Berrange wrote: > On Tue, Apr 12, 2011 at 04:58:48PM +0200, Michal Privoznik wrote: >> When we take out completed calls from queue we might end up >> in circular pointer. We don't want pointer to previous item >> point to element taken out. >> --- >> src/remote/re

Re: [libvirt] Libvirt and IPSec (was: What about Trusted Virtual Domains???)

2011-04-12 Thread Laine Stump
On 04/06/2011 09:10 AM, Paolo Smiraglia wrote: Hi to everyone! First of all, sorry for the thread subject change. Due to the several issues of the Libvirt implementation of the Trusted Virtual Domains (TVD), I decided to approach the topic in a modular manner. I think that the first step sho

Re: [libvirt] [PATCH] Fix possible infinite loop in remote driver

2011-04-12 Thread Daniel P. Berrange
On Tue, Apr 12, 2011 at 04:58:48PM +0200, Michal Privoznik wrote: > When we take out completed calls from queue we might end up > in circular pointer. We don't want pointer to previous item > point to element taken out. > --- > src/remote/remote_driver.c |3 ++- > 1 files changed, 2 insertions

Re: [libvirt] [PATCH] maint: fix grammar errors

2011-04-12 Thread Eric Blake
On 04/11/2011 07:39 PM, Wen Congyang wrote: > At 04/12/2011 06:27 AM, Eric Blake Write: >> Jim recently improved gnulib to catch various grammar errors >> during 'make syntax-check'. >> >> * .gnulib: Update to latest, for syntax-check improvements. >> * include/libvirt/libvirt.h.in (virConnectAuthC

[libvirt] [PATCH] Fix possible infinite loop in remote driver

2011-04-12 Thread Michal Privoznik
When we take out completed calls from queue we might end up in circular pointer. We don't want pointer to previous item point to element taken out. --- src/remote/remote_driver.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remo

[libvirt] [PATCH] - added mapping to Network object - added implementation of select networking functions - virsh net-list and net-info commands now work for esx

2011-04-12 Thread jbarkley
From: jbarkely --- src/esx/esx_network_driver.c | 181 +++- src/esx/esx_vi.c | 104 ++- src/esx/esx_vi.h |9 ++ src/esx/esx_vi_generator.input | 78 + 4 files changed, 366 insertions(+),

Re: [libvirt] Libvirt and IPSec

2011-04-12 Thread Michal Novotny
On 04/12/2011 01:23 PM, Paolo Smiraglia wrote: > Hi Michael! > Thanks for the reply. Comments are inline. > >> Hi Paolo, >> so basically this is about IPSec driver implementation to the libvirt ? > Exactly... > Ok, right. I don't know much about IPSec itself so some study on the matter would be n

Re: [libvirt] Libvirt and IPSec (was: What about Trusted Virtual Domains???)

2011-04-12 Thread Paolo Smiraglia
Hi Michael! Thanks for the reply. Comments are inline. > Hi Paolo, > so basically this is about IPSec driver implementation to the libvirt ? Exactly... > I don't think the idea is bad however I'm not working on libvirt too > much so you should ask libvirt guys about they opinion. > > Since I th

Re: [libvirt] [PATCH 3/6] use virObject to manage reference-count of virDomainObj

2011-04-12 Thread Daniel P. Berrange
On Tue, Apr 12, 2011 at 06:33:21PM +0800, Hu Tao wrote: > On Tue, Apr 12, 2011 at 06:22:12PM +0800, Wen Congyang wrote: > > At 04/12/2011 01:51 PM, Hu Tao Write: > > > Sorry, I unexpectedly deleted text body. > > > > > > I changed the code like this: > > > > > > diff --git a/src/qemu/qemu_domain.

Re: [libvirt] [PATCH 3/6] use virObject to manage reference-count of virDomainObj

2011-04-12 Thread Hu Tao
On Tue, Apr 12, 2011 at 06:22:12PM +0800, Wen Congyang wrote: > At 04/12/2011 01:51 PM, Hu Tao Write: > > Sorry, I unexpectedly deleted text body. > > > > I changed the code like this: > > > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > > index c2a1f9a..8aad0b3 100644 > > --- a

Re: [libvirt] [PATCH 3/6] use virObject to manage reference-count of virDomainObj

2011-04-12 Thread Wen Congyang
At 04/12/2011 01:51 PM, Hu Tao Write: > Sorry, I unexpectedly deleted text body. > > I changed the code like this: > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index c2a1f9a..8aad0b3 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -514,7 +514,10 @@

Re: [libvirt] qemu-namespace handling?

2011-04-12 Thread Daniel P. Berrange
On Tue, Apr 12, 2011 at 09:29:15AM +0200, Philipp Hahn wrote: > Hello, > > some time ago I hand to manipulate the domain XML description using Pythons > Elemtree XML implementation, which had problems generating the right format > for libvirt: elemtree just supports adding Qname elements (that

Re: [libvirt] [libvirt-php 0/2] Fixed some memory leaks

2011-04-12 Thread Michal Novotny
On 04/12/2011 11:35 AM, Lyre wrote: > Hi all: > > This patch fixed some memory leaks > > Lyre (2): > Fix memory leak when connection failed > Fix memory leak when releasing connection & domain > > src/libvirt-php.c | 36 +++- > 1 files changed, 27 insertions

[libvirt] [libvirt-php 0/2] Fixed some memory leaks

2011-04-12 Thread Lyre
Hi all: This patch fixed some memory leaks Lyre (2): Fix memory leak when connection failed Fix memory leak when releasing connection & domain src/libvirt-php.c | 36 +++- 1 files changed, 27 insertions(+), 9 deletions(-) -- 1.7.3.4 C -- libvir-list ma

[libvirt] [libvirt-php 1/2] Fix memory leak when connection failed

2011-04-12 Thread Lyre
--- src/libvirt-php.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 9998fc8..e6a780a 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -788,7 +788,11 @@ PHP_FUNCTION(libvirt_connect) efree(creds);

[libvirt] [libvirt-php 2/2] Fix memory leak when releasing connection & domain

2011-04-12 Thread Lyre
--- src/libvirt-php.c | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index e6a780a..ce9d0b9 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -291,10 +291,17 @@ static void php_libvirt_connection

Re: [libvirt] Libvirt and IPSec (was: What about Trusted Virtual Domains???)

2011-04-12 Thread Michal Novotny
On 04/06/2011 03:10 PM, Paolo Smiraglia wrote: > Hi to everyone! First of all, sorry for the thread subject change. > > Due to the several issues of the Libvirt implementation of the Trusted > Virtual Domains (TVD), I decided to approach the topic in a modular manner. Hi Paolo, so basically this

Re: [libvirt] [PATCH 1/6] Add new API virDomainStreamDisk[Info] to header and drivers

2011-04-12 Thread Kevin Wolf
Am 12.04.2011 10:14, schrieb Daniel P. Berrange: > On Mon, Apr 11, 2011 at 05:06:54PM -0500, Anthony Liguori wrote: >> On 04/11/2011 04:45 PM, Daniel P. Berrange wrote: >>> On Fri, Apr 08, 2011 at 02:26:48PM -0500, Anthony Liguori wrote: On 04/08/2011 11:02 AM, Stefan Hajnoczi wrote: > On

Re: [libvirt] [PATCH 1/6] Add new API virDomainStreamDisk[Info] to header and drivers

2011-04-12 Thread Daniel P. Berrange
On Mon, Apr 11, 2011 at 05:06:54PM -0500, Anthony Liguori wrote: > On 04/11/2011 04:45 PM, Daniel P. Berrange wrote: > >On Fri, Apr 08, 2011 at 02:26:48PM -0500, Anthony Liguori wrote: > >>On 04/08/2011 11:02 AM, Stefan Hajnoczi wrote: > >>>On Fri, Apr 8, 2011 at 2:31 PM, Daniel P. Berrange > >>

[libvirt] qemu-namespace handling?

2011-04-12 Thread Philipp Hahn
Hello, some time ago I hand to manipulate the domain XML description using Pythons Elemtree XML implementation, which had problems generating the right format for libvirt: elemtree just supports adding Qname elements (that is "{http://libvirt.org/schemas/domain/qemu/1.0}commandline";) which in

Re: [libvirt] snapshots += domain description?

2011-04-12 Thread Philipp Hahn
Hello Eric, On Monday April, 11th 2011 23:39:05 Eric Blake wrote: > Are you referring to a disk snapshot, created via 'virsh snapshot' on a > qcow2 image, or a memory snapshot, created via 'virsh save'? The first one (snapshot). > So it sounds like you are talking about the 'virsh snapshot' fami

Re: [libvirt] [PATCH] esx: Cleanup and refactor CastFromAnyType macros

2011-04-12 Thread Daniel Veillard
On Sun, Apr 10, 2011 at 01:27:19PM +0200, Matthias Bolte wrote: > Add CastFromAnyType functions for the String type. > --- > src/esx/esx_vi_generator.py |5 +-- > src/esx/esx_vi_types.c | 64 +++--- > src/esx/esx_vi_types.h |2 + > 3 files ch

Re: [libvirt] [PATCH] esx: Cleanup VI generator code

2011-04-12 Thread Daniel Veillard
On Sun, Apr 10, 2011 at 01:26:47PM +0200, Matthias Bolte wrote: > --- > src/esx/esx_vi_generator.py | 177 > +-- > 1 files changed, 71 insertions(+), 106 deletions(-) > > diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py > index 3d068