Re: [libvirt] Libvir JNA report SIGSEGV

2012-09-09 Thread Benjamin Wang (gendwang)
Hi, The problem is located. The root cause is that esxConnectToHost/esxConnectToVCenter method defined in esx_driver.c will collect the username and password. JNA will allocate the memory for username and password. But esxConnectToHost/esxConnectToVCenter will free the memory allocated by J

Re: [libvirt] [PATCH 6/6] list: Expose virStoragePoolListAllVolumes to Python binding

2012-09-09 Thread Osier Yang
On 2012年09月07日 21:49, Peter Krempa wrote: On 09/04/12 17:32, Osier Yang wrote: The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virStoragePool.py: * New file

Re: [libvirt] [PATCH V5] support offline migration

2012-09-09 Thread liguang
Hi, Daniel Thanks! 在 2012-09-07五的 12:59 +0100,Daniel P. Berrange写道: > On Thu, Sep 06, 2012 at 01:24:45PM +0800, liguang wrote: > > original migration did not aware of offline case, > > so, add code to support offline migration quietly > > (did not disturb original migration) by pass > > VIR_MIGRA

[libvirt] [PATCH 2/2] virsh: Rename QEmu to QEMU to match upstream

2012-09-09 Thread Doug Goldstein
Match upstream's naming of QEMU. There was a notice on the ML that said the preferred spelling was QEMU a while back. --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8592df9..6ade4a6 100644 --- a/tools/virsh.c +++ b/to

[libvirt] [PATCH 1/2] virsh: Move daemon to misc since its not a network

2012-09-09 Thread Doug Goldstein
Move the 'Daemon' entry to the Miscellaneous section since its not a networking driver or component. --- tools/virsh.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 242f789..8592df9 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @

[libvirt] [PATCHv2 2/2] interface: add udev based backend for virInterface

2012-09-09 Thread Doug Goldstein
Add a read-only udev based backend for virInterface. Useful for distros that do not have netcf support yet. Multiple libvirt based utilities use a HAL based fallback when virInterface is not available which is less than ideal. This implements: * virConnectNumOfInterfaces() * virConnectListInterface

[libvirt] [PATCHv2 1/2] build: define WITH_INTERFACE for the driver

2012-09-09 Thread Doug Goldstein
Based exclusively on work by Eric Blake in a patch posted with the same subject. However some modifications related to comments and my plans to add another backend. Added WITH_INTERFACE as the only automake variable deciding whether to build the driver and using WITH_NETCF to identify that we're w

[libvirt] [PATCHv2 0/2] interface driver build cleanup and udev backend addition

2012-09-09 Thread Doug Goldstein
Refactored the cross use of netcf and interface for the interface driver into only interface driver references. Made netcf the primary backend provider for the interface driver. Added a udev based read-only interface driver backend to be used when netcf support is not built in. Change from v1: * r

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Matthias Bolte
2012/9/9 Ata Bohra : >> Date: Sun, 9 Sep 2012 21:12:43 +0200 > >> Subject: Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI >> support >> From: matthias.bo...@googlemail.com >> To: ata.hus...@hotmail.com >> CC: libvir-list@redhat.com >> >> >> This patch is quite huge. Maybe you could

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Matthias Bolte
2012/9/9 Ata Bohra > > Please see inline. > > > + if (hostInternetScsiHba->configuredStaticTarget) { > > > + const esxVI_HostInternetScsiHbaStaticTarget *target = NULL; > > > + for (target = hostInternetScsiHba->configuredStaticTarget; > > > + target != NULL; target = target->_next) { > > > + ++c

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Ata Bohra
> Date: Sun, 9 Sep 2012 21:12:43 +0200 > Subject: Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI > support > From: matthias.bo...@googlemail.com > To: ata.hus...@hotmail.com > CC: libvir-list@redhat.com > > > This patch is quite huge. Maybe you could split it up into two > patch

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Ata Bohra
Please see inline. > Date: Sun, 9 Sep 2012 19:39:34 +0200 > Subject: Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI > support > From: matthias.bo...@googlemail.com > To: ata.hus...@hotmail.com > CC: libvir-list@redhat.com > > 2012/8/20 Ata E Husain Bohra : > > The patch refact

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Matthias Bolte
2012/8/20 Ata E Husain Bohra : > The patch refactors the current ESX storage driver due to following reasons: > > 1. Given most of the public APIs exposed by the storage driver in Libvirt >remains same, ESX storage driver should not implement logic specific >for only one supported format (c

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-09 Thread Matthias Bolte
2012/8/20 Ata E Husain Bohra : > The patch refactors the current ESX storage driver due to following reasons: > > 1. Given most of the public APIs exposed by the storage driver in Libvirt >remains same, ESX storage driver should not implement logic specific >for only one supported format (c

Re: [libvirt] [PATCHv6 0/2] Implementation of virConnectListAllDomains() for esx and hyperv

2012-09-09 Thread Matthias Bolte
2012/9/6 Peter Krempa : > On 09/06/12 07:24, Daniel Veillard wrote: >> >> On Fri, Aug 31, 2012 at 05:36:51PM +0200, Peter Krempa wrote: >>> >>> Yet another respin updated and rebased to current head. >>> >>> Both drivers are compile tested but I don't have the infrastructure do a >>> functional tes

[libvirt] [PATCH v2] esx: Fix and improve esxListAllDomains function

2012-09-09 Thread Matthias Bolte
Avoid requesting information such as identity or power state when it is not necessary. Lookup virtual machine list with the required fields (configStatus, name, and config.uuid) to make esxVI_GetVirtualMachineIdentity work. No need to call esxVI_GetNumberOfSnapshotTrees. rootSnapshotTreeList can

Re: [libvirt] [PATCH] esx: Fix and improve esxListAllDomains function

2012-09-09 Thread Matthias Bolte
2012/9/9 Matthias Bolte : > Avoid requesting information such as identity or power state when it > is not necessary. > > Lookup virtual machine list with the required fields (configStatus, > name, and config.uuid) to make esxVI_GetVirtualMachineIdentity work. > > No need to call esxVI_GetNumberOfSn

[libvirt] [PATCH] hyperv: Fix and improve hypervListAllDomains

2012-09-09 Thread Matthias Bolte
Use MATCH for all flags checks. hypervMsvmComputerSystemToDomain expects the domain pointer to the initialized to NULL. All items in doms up to the count-th one are valid, no need to double check before freeing them. --- I could no runtime-test this because I've have trouble getting my Hyper-V s

Re: [libvirt] Memory free in libvirt JNA

2012-09-09 Thread Benjamin Wang (gendwang)
Hi, I wrote a code to verify the memory leak problem as following. C code in so: void checkJNAMemLeak1(int **head, int *length) { long i = 0; *head = (int *)malloc(sizeof(int) * 1); for(i=0; i<1; i++) { (*head)[i] = 1; } *length = 1; } J

[libvirt] [PATCH] esx: Remove unused variable from esxDomainGetAutostart

2012-09-09 Thread Matthias Bolte
--- I've pushed this one under the trivial rule. src/esx/esx_driver.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 28e2c65..991f03c 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -3363,7 +3363,6 @@ es

[libvirt] [PATCH] esx: Fix and improve esxListAllDomains function

2012-09-09 Thread Matthias Bolte
Avoid requesting information such as identity or power state when it is not necessary. Lookup virtual machine list with the required fields (configStatus, name, and config.uuid) to make esxVI_GetVirtualMachineIdentity work. No need to call esxVI_GetNumberOfSnapshotTrees. rootSnapshotTreeList can

[libvirt] [PATCH v3] esx: Support VLAN tags in virtual network port groups

2012-09-09 Thread Matthias Bolte
--- v2: Use network level VLAN config if there is no portgroup specific VLAN config given. v3: Add ESX_VLAN_TRUNK define for magic number 4095 src/esx/esx_network_driver.c | 70 +++--- 1 files changed, 65 insertions(+), 5 deletions(-) diff --git a/src/

Re: [libvirt] SCSI command passthrough

2012-09-09 Thread Dor Laor
On 09/06/2012 07:51 PM, Geert Jansen wrote: Hi, i'm trying to pass through SCSI commands from a guest to a host. Both guest and host are RHEL 6.3. The relevant section in my XML is: ... Commands that are whitelisted by