[libvirt] [PATCH] npiv: Auto-generate WWN if it's not specified

2012-01-09 Thread Osier Yang
The auto-generated WWN comply with the new addressing schema of WWN: the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. We choose hex 5 for the first nibble. And use Qumranet's OUI (00:1A:4A) as the 3-byte vendor indent

Re: [libvirt] [test-API][PATCH] Add domain event type "Shutdown"

2012-01-09 Thread Guannan Ren
On 01/09/2012 04:33 PM, Wayne Sun wrote: * domain have 7 event types, add the missing shutdown type * shutdown only have 1 detail type 'Finished' --- repos/domain/eventhandler.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/repos/domain/eventhandler.py b/re

Re: [libvirt] [PATCHv2] docs: standardize description of flags

2012-01-09 Thread Osier Yang
On 2012年01月10日 04:59, Eric Blake wrote: We had loads of different styles in describing the @flags parameter for various APIs, as well as several APIs that didn't list which enums provided the bit values valid for the flags. The end result is one of two formats: @flags: bitwise-OR of vir...Flags

Re: [libvirt] [PATCH 1/6] Optimize the elements the iterator visits.

2012-01-09 Thread Eric Blake
On 12/09/2011 08:07 AM, Stefan Berger wrote: > In this patch we introduce testing whether the iterator points to a > unique set of entries that have not been seen before at one of the previous > iterations. The point is to eliminate duplicates and with that unnecessary > filtering rules by preventi

Re: [libvirt] [PATCH 6/6] normalize_xml: New virsh command to normalize device XML

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > The command here is just to demo the effect of the API and for > one wants to play with it, it's not much useful as a virsh command > IMO, so it's not for final commit. On the contrary, I think that every libvirt API should be exposed via virsh commands,

Re: [libvirt] [PATCH 4/6] normalize_xml: New internal API to format device XML

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > --- More details in the commit message might be nice. > src/conf/domain_conf.c | 70 > ++ > src/conf/domain_conf.h |2 + > src/libvirt_private.syms |1 + > 3 files changed, 73 insertions(+), 0

Re: [libvirt] [PATCH 5/6] normalize_xml: Implement qemu driver support

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > If the domain is running, the live def is used to parse the device > XML, otherwise persistent def is used. > --- > src/qemu/qemu_driver.c | 47 +++ > 1 files changed, 47 insertions(+), 0 deletions(-) Either

Re: [libvirt] [PATCH 3/6] normalize_xml: Wire up the remote protocol

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > --- > src/remote/remote_driver.c |1 + > src/remote/remote_protocol.x | 12 +++- > src/remote_protocol-structs |9 + > 3 files changed, 21 insertions(+), 1 deletions(-) > > diff --git a/src/remote/remote_driver.c b/src/remot

Re: [libvirt] [PATCH 2/6] normalize_xml: Implement the new API

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > --- > src/libvirt.c | 52 > 1 files changed, 52 insertions(+), 0 deletions(-) > > diff --git a/src/libvirt.c b/src/libvirt.c > index 896d151..223f07b 100644 > --- a/src/libvirt.c > +++ b/src/libvirt

Re: [libvirt] [PATCH 1/6] normalize_xml: Define the new API

2012-01-09 Thread Eric Blake
On 01/09/2012 07:29 AM, Osier Yang wrote: > --- Mention the API name in the commit message, so that grepping 'git log' makes it easier to find when the API was added. > include/libvirt/libvirt.h.in |3 +++ > src/driver.h |5 + > src/libvirt_public.syms |5 +++

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Eric Blake
On 01/09/2012 07:37 AM, Daniel P. Berrange wrote: > On Mon, Jan 09, 2012 at 10:29:08PM +0800, Osier Yang wrote: >> The initial purpose was to fix a regression for detaching device, >> (introduced by commit ea7182c29). There was a patch posted to >> resolve the problem: >> >> https://www.redhat.com/

Re: [libvirt] [PATCH] Docs: Document Android application using libvirt

2012-01-09 Thread Eric Blake
On 01/09/2012 03:42 AM, Michal Privoznik wrote: > This is acutally a patch for VM Manager for Android. s/acutally/actually/ > > https://www.redhat.com/archives/libvirt-users/2011-November/msg00076.html > --- > docs/apps.html.in | 11 +++ > 1 files changed, 11 insertions(+), 0 deletion

[libvirt] [PATCHv2] docs: standardize description of flags

2012-01-09 Thread Eric Blake
We had loads of different styles in describing the @flags parameter for various APIs, as well as several APIs that didn't list which enums provided the bit values valid for the flags. The end result is one of two formats: @flags: bitwise-OR of vir...Flags @flags: extra flags; not used yet, so call

Re: [libvirt] [PATCH] Docs: Improve documents for several APIs

2012-01-09 Thread Eric Blake
On 01/09/2012 12:04 AM, Osier Yang wrote: > virDomainGetBlockIoTune uses virTypedParameterFlags actually. And > The definition of virTypedParameterFlags contains virDomainModificationImpact. NACK. From libvirt.h.in: typedef enum { VIR_DOMAIN_AFFECT_CURRENT = 0, /* Affect current domain s

Re: [libvirt] [PATCH] qemu: check for kvm availability before starting kvm guests

2012-01-09 Thread Eric Blake
On 01/09/2012 01:05 PM, Laine Stump wrote: > This *kind of* addresses: > > https://bugzilla.redhat.com/show_bug.cgi?id=772395 > > (it doesn't eliminate the failure to start, but causes libvirt to give > a better idea about the cause of the failure). > > If a guest uses a kvm emulator (e.g. /us

[libvirt] [PATCH] qemu: check for kvm availability before starting kvm guests

2012-01-09 Thread Laine Stump
This *kind of* addresses: https://bugzilla.redhat.com/show_bug.cgi?id=772395 (it doesn't eliminate the failure to start, but causes libvirt to give a better idea about the cause of the failure). If a guest uses a kvm emulator (e.g. /usr/bin/qemu-kvm) and the guest is started when kvm isn't ava

[libvirt] [PATCH] snapshot: allow reuse of existing files in disk snapshot

2012-01-09 Thread Eric Blake
When disk snapshots were first implemented, libvirt blindly refused to allow an external snapshot destination that already exists, since qemu will blindly overwrite the contents of that file during the snapshot_blkdev monitor command, and we don't like a default of data loss by default. But VDSM h

Re: [libvirt] [PATCH] PolicyKit: Check auth before asking client to obtain it

2012-01-09 Thread Jim Fehlig
Daniel P. Berrange wrote: > On Thu, Jan 05, 2012 at 01:12:37PM -0700, Eric Blake wrote: > >> On 01/03/2012 03:35 PM, Jim Fehlig wrote: >> >>> I previously mentioned [1] a PolicyKit issue where libvirt would >>> proceed with authentication even though polkit-auth failed: >>> >>> testusr xen1

[libvirt] [PATCH 1/2] Compare two hash tables for equality

2012-01-09 Thread Stefan Berger
Add function to compare two hash tables for equality. --- src/util/hash.c | 46 ++ src/util/hash.h | 12 2 files changed, 58 insertions(+) Index: libvirt-iterator/src/util/hash.c

[libvirt] [PATCH 0/2] nwfilter: Compare filters for equality when updating

2012-01-09 Thread Stefan Berger
When a filter is updated, compare it and the original one for equality so that unnecessary instantiations of rules can be avoided. Regards, Stefan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 2/2] nwfilter: Rebuild filters only of new filter is different than current

2012-01-09 Thread Stefan Berger
Compare two filter definitions for equality and only rebuild the filters if the two filters are found to be different. This improves performance during an update of a filter with no obvious change or the reloading of filters during a 'kill -SIGHUP' --- src/Makefile.am |1 src/c

[libvirt] ANNOUNCE: libvirt Perl binding Sys::Virt, release 0.9.9

2012-01-09 Thread Daniel P. Berrange
I'm happy to announce that the libvirt Perl binding, Sys::Virt, release 0.9.9 is now available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.9.9.tar.gz In this release 0.9.9: - Add all new APIs in libvirt 0.9.9 - Fix crash in get_hostname - Fix docs typos & ne

[libvirt] [PATCH] storage: Support different wiping algorithms

2012-01-09 Thread Michal Privoznik
Currently, we support only filling a volume with zeroes on wiping. However, it is not enough as data might still be readable by experienced and equipped attacker. Many technical papers have been written, therefore we should support other wiping algorithms. --- diff to v1: -Daniel's suggestions take

Re: [libvirt] [PATCHv3 2/2] qemu: add new disk device='lun' for bus='virtio' & type='block'

2012-01-09 Thread Laine Stump
On 01/05/2012 01:49 PM, Eric Blake wrote: On 01/05/2012 11:35 AM, Laine Stump wrote: In the past, generic SCSI commands issued from a guest to a virtio disk were always passed through to the underlying disk by qemu, and the kernel would also pass them on. v3 changes: 1) Add note to docs that t

Re: [libvirt] [PATCH 0/6] nwfilter: Enable access to variables via iterator or index

2012-01-09 Thread Stefan Berger
On 12/09/2011 10:07 AM, Stefan Berger wrote: This patch enables access to variables in filters using indep. iterators ($TEST[$@2]) or via index ($TEST[1]). Three test cases are added that are also being used for libvirt-TCK to check that the instantiation of the filtering rules is correct. Doe

Re: [libvirt] [PATCH 3/6] Add support for cpu mode attribute

2012-01-09 Thread Jiri Denemark
On Sat, Jan 07, 2012 at 07:06:31 -0700, Eric Blake wrote: > On 01/06/2012 08:04 AM, Jiri Denemark wrote: > > The mode can be either of "custom" (default), "host-model", > > "host-passthrough". The semantics of each mode is described in the > > following examples: ... > Your RNG does not match your

Re: [libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 10:29:08PM +0800, Osier Yang wrote: > The initial purpose was to fix a regression for detaching device, > (introduced by commit ea7182c29). There was a patch posted to > resolve the problem: > > https://www.redhat.com/archives/libvir-list/2011-December/msg00818.html > > Bu

[libvirt] [RFC PATCH 0/6] New API to normalize the device XML

2012-01-09 Thread Osier Yang
The initial purpose was to fix a regression for detaching device, (introduced by commit ea7182c29). There was a patch posted to resolve the problem: https://www.redhat.com/archives/libvir-list/2011-December/msg00818.html But as Eric suggested, it's not the ideal way to go, we never known how many

[libvirt] [PATCH 5/6] normalize_xml: Implement qemu driver support

2012-01-09 Thread Osier Yang
If the domain is running, the live def is used to parse the device XML, otherwise persistent def is used. --- src/qemu/qemu_driver.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver

[libvirt] [PATCH 4/6] normalize_xml: New internal API to format device XML

2012-01-09 Thread Osier Yang
--- src/conf/domain_conf.c | 70 ++ src/conf/domain_conf.h |2 + src/libvirt_private.syms |1 + 3 files changed, 73 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0190a81..f0ed479 100644 --

[libvirt] [PATCH 2/6] normalize_xml: Implement the new API

2012-01-09 Thread Osier Yang
--- src/libvirt.c | 52 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 896d151..223f07b 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -17867,3 +17867,55 @@ error: virDispatchError(d

[libvirt] [PATCH 6/6] normalize_xml: New virsh command to normalize device XML

2012-01-09 Thread Osier Yang
The command here is just to demo the effect of the API and for one wants to play with it, it's not much useful as a virsh command IMO, so it's not for final commit. --- tools/virsh.c | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff

[libvirt] [PATCH 3/6] normalize_xml: Wire up the remote protocol

2012-01-09 Thread Osier Yang
--- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 12 +++- src/remote_protocol-structs |9 + 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 7580477..74225af 100644 --- a/sr

[libvirt] [PATCH 1/6] normalize_xml: Define the new API

2012-01-09 Thread Osier Yang
--- include/libvirt/libvirt.h.in |3 +++ src/driver.h |5 + src/libvirt_public.syms |5 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index ad6fcce..5f2c46b 100644 --- a/include

[libvirt] FOSDEM 2012, libvirt related talks

2012-01-09 Thread Daniel P. Berrange
As Mark mentioned [1] a month or 2 back, there is a dedicated Virt & Cloud dev room at FOSDEM this year. I'm pleased to say that I will be attending, giving a talk titled "Building application sandboxes on top of LXC and KVM with libvirt" At this talk I will be introducing the libvirt-sandbox

[libvirt] [PATCH] Docs: Document Android application using libvirt

2012-01-09 Thread Michal Privoznik
This is acutally a patch for VM Manager for Android. https://www.redhat.com/archives/libvirt-users/2011-November/msg00076.html --- docs/apps.html.in | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/docs/apps.html.in b/docs/apps.html.in index 8d27b70..29bebbd 100

Re: [libvirt] [PATCH] storage: Support different wiping algorithms

2012-01-09 Thread Daniel P. Berrange
On Tue, Jan 03, 2012 at 05:12:47PM +0100, Michal Privoznik wrote: > Currently, we support only filling a volume with zeroes on wiping. > However, it is not enough as data might still be readable by > experienced and equipped attacker. Many technical papers have been > written, therefore we should s

Re: [libvirt] [PATCH] storage: Support different wiping algorithms

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 11:05:28AM +0100, Michal Privoznik wrote: > On 03.01.2012 17:39, Daniel P. Berrange wrote: > > On Tue, Jan 03, 2012 at 05:12:47PM +0100, Michal Privoznik wrote: > >> Currently, we support only filling a volume with zeroes on wiping. > >> However, it is not enough as data mig

Re: [libvirt] [PATCH] storage: Support different wiping algorithms

2012-01-09 Thread Michal Privoznik
On 03.01.2012 17:39, Daniel P. Berrange wrote: > On Tue, Jan 03, 2012 at 05:12:47PM +0100, Michal Privoznik wrote: >> Currently, we support only filling a volume with zeroes on wiping. >> However, it is not enough as data might still be readable by >> experienced and equipped attacker. Many technic

Re: [libvirt] [libvirt-glib 2/2] Use g_simple_async_result_is_valid in _finish functions

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 10:11:12AM +0100, Christophe Fergeau wrote: > The _finish functions for async operations can be simplified by > using g_simple_async_result_is_valid instead of doing the checks > it does by ourselves. > --- > libvirt-gobject/libvirt-gobject-connection.c| 37 +++---

Re: [libvirt] [libvirt-glib 1/2] Follow glib conventions for SimpleAsyncResult source tag

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 10:11:11AM +0100, Christophe Fergeau wrote: > g_simple_async_result_is_valid() API documentation says that the > source tag field for SimpleAsyncResult objects "by convention, is a > pointer to the _async function corresponding to the _finish function from > which this funct

Re: [libvirt] [PATCH 0/4 0/1 0/1 V2] Add new public API virDomainGetPcpusUsage() and pcpuinfo command in virsh

2012-01-09 Thread Lai Jiangshan
On 01/05/2012 12:55 AM, Eric Blake wrote: > On 01/03/2012 09:09 PM, Lai Jiangshan wrote: >> "virt-top -1" can call virDomainGetPcpusUsage() periodically and get >> the CPU activities per CPU. (See the last patch in this series). >> >> virsh is also added a pcpuinfo command which calls virDomainGetP

[libvirt] [libvirt-glib 1/2] Follow glib conventions for SimpleAsyncResult source tag

2012-01-09 Thread Christophe Fergeau
g_simple_async_result_is_valid() API documentation says that the source tag field for SimpleAsyncResult objects "by convention, is a pointer to the _async function corresponding to the _finish function from which this function is called" The stream functions were already following this convention,

[libvirt] [libvirt-glib 2/2] Use g_simple_async_result_is_valid in _finish functions

2012-01-09 Thread Christophe Fergeau
The _finish functions for async operations can be simplified by using g_simple_async_result_is_valid instead of doing the checks it does by ourselves. --- libvirt-gobject/libvirt-gobject-connection.c| 37 +++-- libvirt-gobject/libvirt-gobject-domain.c| 15 +++ libvi

[libvirt] [test-API][PATCH] Add domain event type "Shutdown"

2012-01-09 Thread Wayne Sun
* domain have 7 event types, add the missing shutdown type * shutdown only have 1 detail type 'Finished' --- repos/domain/eventhandler.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/repos/domain/eventhandler.py b/repos/domain/eventhandler.py index cdbba90..7d8b6