[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

[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/

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

2012-08-26 Thread Matthias Bolte
--- v2: Use network level VLAN config if there is no portgroup specific VLAN config given. src/esx/esx_network_driver.c | 65 ++--- 1 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.

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

2012-08-26 Thread Matthias Bolte
2012/8/20 Laine Stump : > On 08/18/2012 07:46 AM, Matthias Bolte wrote: >> --- >> src/esx/esx_network_driver.c | 38 +- >> 1 files changed, 33 insertions(+), 5 deletions(-) >> >> diff --git a/src/esx/esx_network_driver

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

2012-08-18 Thread Matthias Bolte
--- src/esx/esx_network_driver.c | 38 +- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 09d46d3..2f5f1ab 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_dri

Re: [libvirt] Proposal to add iSCSI support to esx storage driver

2012-08-12 Thread Matthias Bolte
e implementation will be pertinent >> > to >> > its specific type. >> >> I took a quick look at the vSphere API regarding iSCSI but I'm not >> sure how it's supposed to work. Do you have a better understanding >> about this. I'd like to discuss the c

Re: [libvirt] [PATCH] build: fix PROBE() usage of intptr_t

2012-08-09 Thread Matthias Bolte
src/xenapi/xenapi_utils.c: Likewise. > * src/xenapi/xenapi_utils.h: Likewise. > * src/xenxs/xenxs_private.h: Likewise. > * tests/storagebackendsheepdogtest.c: Likewise. > Reported by Matthias Bolte. > --- > > Almost qualifies for the build-breaker rule, except that I didn't >

Re: [libvirt] [PATCH] esx: Implement network driver

2012-08-09 Thread Matthias Bolte
2012/8/6 Michal Privoznik : > On 05.08.2012 22:11, Matthias Bolte wrote: >> An ESX server has one or more PhysicalNics that represent the actual >> hardware NICs. Those can be listed via the interface driver. >> >> A libvirt virtual network is mapped to a HostVirtualSwit

Re: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

2012-08-09 Thread Matthias Bolte
2012/8/6 Michal Privoznik : > On 05.08.2012 13:48, Matthias Bolte wrote: >> esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL. >> Remove redundant NULL checks from callers. >> >> Also prefer esxVI_GetStringValue over open-coding the logic. >

Re: [libvirt] [PATCH] esx: Implement interface driver

2012-08-09 Thread Matthias Bolte
2012/8/6 Michal Privoznik : > On 05.08.2012 22:10, Matthias Bolte wrote: >> Lists available PhysicalNic devices. A PhysicalNic is always active >> and can neither be defined nor undefined. >> >> A PhysicalNic is used to bridge a HostVirtualSwitch to the physical &g

Re: [libvirt] [PATCH] esx: Fix dynamic deep copy

2012-08-09 Thread Matthias Bolte
2012/8/6 Michal Privoznik : > On 05.08.2012 10:38, Matthias Bolte wrote: >> The static deep copy allocates storage for the copy. The dynamic >> version injected the dynamic dispatch after the allocation. This >> triggered the invalid argument check in the dynamically dispatc

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-07 Thread Matthias Bolte
the host kernel if the bridge has an IP > address.) This sounds like a promising idea that might allow to expose a HostVirtualNic as part of a libvirt network. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-07 Thread Matthias Bolte
Add routines to interface driver >> From: matthias.bo...@googlemail.com >> To: ata.hus...@hotmail.com >> CC: libvir-list@redhat.com >> >> 2012/8/5 Matthias Bolte : >> > 2012/8/2 Ata E Husain Bohra : >> >> Add following routines to esx_int

Re: [libvirt] Proposal to add iSCSI support to esx storage driver

2012-08-05 Thread Matthias Bolte
onceptual part first. How does storage pool and volume listing/creation/destruction work with iSCSI? Does it differ from the current code at all? If it differs is it that different that we really need this radical split? -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-05 Thread Matthias Bolte
2012/8/5 Matthias Bolte : > 2012/8/2 Ata E Husain Bohra : >> Add following routines to esx_interface_driver: >> esxNumOfInterfaces, >> esxNumOfDefinedInterfaces, >> esxListInterfaces, >> esxListDefinedInterfaces, >> esxInterfaceLookupByM

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-05 Thread Matthias Bolte
virtual network is best represented by a HostVirtualSwitch and the HostPortGroups are mapped to the portgroups of a libvirt virtual switch. I'm sorry that I let you wait for quite a while now until I came to this understanding that is contrary to your proposed interface driver. -- Matthias Bol

[libvirt] [PATCH] esx: Implement network driver

2012-08-05 Thread Matthias Bolte
UM_DECL(virNetworkForward) + #endif /* __NETWORK_CONF_H__ */ diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 2e0e40b..b42f1d8 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -4,7 +4,7 @@ * host networks * * C

[libvirt] [PATCH] esx: Implement interface driver

2012-08-05 Thread Matthias Bolte
right (C) 2010-2011 Red Hat, Inc. - * Copyright (C) 2010 Matthias Bolte + * Copyright (C) 2010-2012 Matthias Bolte * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,6 +29,8 @@ #include "memory.h&

[libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

2012-08-05 Thread Matthias Bolte
VMware ESX hosts * * Copyright (C) 2010-2012 Red Hat, Inc. - * Copyright (C) 2009-2011 Matthias Bolte + * Copyright (C) 2009-2012 Matthias Bolte * Copyright (C) 2009 Maximilian Wilhelm * * This library is free software; you can redistribute it and/or @@ -467,12 +467,6 @@ esxSupportsLongMode

[libvirt] [PATCH] esx: Fix dynamic deep copy

2012-08-05 Thread Matthias Bolte
The static deep copy allocates storage for the copy. The dynamic version injected the dynamic dispatch after the allocation. This triggered the invalid argument check in the dynamically dispatched deep copy call. The deep copy function expects its dest parameter to be a pointer to a NULL-pointer. T

Re: [libvirt] [PATCH v1] ESX: Add "Byte" datatype

2012-08-03 Thread Matthias Bolte
src/esx/esx_vi_types.h | 29 ++ > 3 files changed, 87 insertions(+) ACK, pushed, thanks. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v4 0/3] ESX: Add routines to interface driver

2012-08-01 Thread Matthias Bolte
tions (for example esxVI_RemoveVirtualNic and esxVI_LookupPhysicalNicFromPortGroup) you're reporting an extra error overwriting the original. probably more detailed error. You should avoid this. I still need to review this patch on the conceptual side, I'll probably have time for this later thi

Re: [libvirt] [PATCH] ESX: Add "Byte" datatype

2012-08-01 Thread Matthias Bolte
nt an ASCII character instead of a number. %d should be used here. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] esx: Improve error reporting for unknown VI types

2012-07-29 Thread Matthias Bolte
2012/7/24 Eric Blake : > On 07/21/2012 02:51 PM, Matthias Bolte wrote: >> Print the actual unknown type name instead of for AnyType objects. >> --- >> src/esx/esx_vi.c |2 +- >> src/esx/esx_vi_types.c | 36 +--- >> src/

Re: [libvirt] [PATCH 1/2] ESX: Add routines to interface driver

2012-07-24 Thread Matthias Bolte
uot; or "p/h" as appropriate, rather than "virtual" > and/or "v". We want to make sure nobody gets the wrong idea about these > functions. I don't think that this is a good idea, we should really stick exactly to the naming of things in the vSphere API otherwise there will be much more confusion. Therefore, esxVI_HostVirtualNic *virtualNicList = NULL; should be esxVI_HostVirtualNic *hostVirtualNicList = NULL; Apart from that I'll do a more detailed review soon. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [Libvirt][PATCH] ESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY

2012-07-21 Thread Matthias Bolte
o %s for unexpected type '%s'"), __FUNCTION__, > \ > + esxVI_Type_ToString(_actual_type)); > \ > +return _error_return; > \ > +} > + No need for this extra copy

Re: [libvirt] ESX: failure while performing "CastFromAnyType"

2012-07-21 Thread Matthias Bolte
_CastFromAnyType for unexpected type '' I have improved this to report the actual type: Call to esxVI_HostHostBusAdapter_CastFromAnyType for unexpected type 'HostBlockHba' Here's the patch for this https://www.redhat.com/archives/libvir-list/2012-July/msg01148.html -

[libvirt] [PATCH] esx: Improve error reporting for unknown VI types

2012-07-21 Thread Matthias Bolte
Print the actual unknown type name instead of for AnyType objects. --- src/esx/esx_vi.c |2 +- src/esx/esx_vi_types.c | 36 +--- src/esx/esx_vi_types.h |1 + 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/esx/esx_vi.c b/src/esx

Re: [libvirt] [PATCH 1/2] vmx: handle shared folders formatting

2012-07-21 Thread Matthias Bolte
void a warning about shadowing a global before pushing. ACK and pushed. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] vmx: handle shared folders parsing

2012-07-21 Thread Matthias Bolte
goto cleanup; > +} > + > +(*def)->dst = strdup(guestName); The result of strdup must be check for NULL. But there is no need to strdup it here as hostPath can just be stolen: (*def)->src = hostPath; hostPath = NULL; ACK and pushed with the mentioned

Re: [libvirt] [PATCH] esx: Fix esxVI_String_Deserialize

2012-07-18 Thread Matthias Bolte
2012/7/19 Eric Blake : > On 07/18/2012 04:48 PM, Matthias Bolte wrote: >> It was broken since forever as it expected a libxml2 >> XML_ELEMENT_NODE containing a XML_TEXT_NODE instead of >> just a XML_TEXT_NODE. >> >> This problem was not discovered for so long be

[libvirt] [PATCH] esx: Fix esxVI_String_Deserialize

2012-07-18 Thread Matthias Bolte
It was broken since forever as it expected a libxml2 XML_ELEMENT_NODE containing a XML_TEXT_NODE instead of just a XML_TEXT_NODE. This problem was not discovered for so long because esxVI_String_Deserialize was not used until now. Reported by Ata Bohra --- src/esx/esx_vi_types.c | 23 +

Re: [libvirt] [PATCH v3] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-18 Thread Matthias Bolte
2012/7/18 Daniel P. Berrange : > On Fri, Jul 13, 2012 at 02:00:19AM +0200, Matthias Bolte wrote: >> Also ensure that the virBuffer used to store the downloaded data >> does not overflow. >> --- >> >> v3: >> - Fix virBuffer limit checks. >> >&g

Re: [libvirt] Linker error in gnulib test-binary-io.c

2012-07-18 Thread Matthias Bolte
2012/6/17 Matthias Bolte : > I get the following error on Ubuntu 11.04 with current libvirt git HEAD: > > $ make check > [...] > CC test-binary-io.o > test-binary-io.c: In function 'main': > test-binary-io.c:54:7: warning: implicit declaration of function >

Re: [libvirt] ESX: failure while performing "CastFromAnyType"

2012-07-18 Thread Matthias Bolte
Hi, do you have a patch that allows me to reproduce this problem? So I can improve the error reporting here? Regards, Matthias 2012/7/18 Ata E Husain Bohra : > Just want to drop this note, so no one else gets bother with my query. I was > able to find the reason and its fixed. It seems one of th

[libvirt] [PATCH v3] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-12 Thread Matthias Bolte
Also ensure that the virBuffer used to store the downloaded data does not overflow. --- v3: - Fix virBuffer limit checks. v2: - Ensure that the used virBuffer dos not overflow. src/esx/esx_driver.c |2 +- src/esx/esx_vi.c | 62 +++-- src/e

Re: [libvirt] [PATCH v2] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-09 Thread Matthias Bolte
2012/7/8 Doug Goldstein : > On Sun, Jul 8, 2012 at 5:44 AM, Matthias Bolte > wrote: >> Also ensure that the virBuffer used to store the downloaded data >> does not overflow. >> --- >> >> v2: >> - Ensure that the used virBuffer dos not overflow. >>

[libvirt] [PATCH v2] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-08 Thread Matthias Bolte
Also ensure that the virBuffer used to store the downloaded data does not overflow. --- v2: - Ensure that the used virBuffer dos not overflow. src/esx/esx_driver.c |2 +- src/esx/esx_vi.c | 62 +++-- src/esx/esx_vi.h |3 +- 3 files c

Re: [libvirt] [PATCH 1/3] esx: Wrap libcurl multi handle

2012-07-08 Thread Matthias Bolte
2012/7/3 Doug Goldstein : > On Tue, Jul 3, 2012 at 3:17 PM, Matthias Bolte > wrote: >> 2012/7/3 Doug Goldstein : >>> On Mon, Jul 2, 2012 at 4:44 PM, Matthias Bolte >>> wrote: >>>> --- >>>> src/esx/esx_vi.c | 111 >>>> ++

Re: [libvirt] [PATCH 0/3] esx: Storage volume up- and download

2012-07-03 Thread Matthias Bolte
2012/7/3 Daniel P. Berrange : > On Tue, Jul 03, 2012 at 09:51:52PM +0200, Matthias Bolte wrote: >> 2012/7/3 Doug Goldstein : >> > On Mon, Jul 2, 2012 at 4:44 PM, Matthias Bolte >> > wrote: >> >> I started the download part and the stream driver quite a while

Re: [libvirt] [PATCH 2/3] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-03 Thread Matthias Bolte
2012/7/3 Doug Goldstein : > On Mon, Jul 2, 2012 at 4:44 PM, Matthias Bolte > wrote: >> --- >> src/esx/esx_driver.c |2 +- >> src/esx/esx_vi.c | 27 +-- >> src/esx/esx_vi.h |3 ++- >> 3 files changed, 28 insertions(+

Re: [libvirt] [PATCH 1/3] esx: Wrap libcurl multi handle

2012-07-03 Thread Matthias Bolte
2012/7/3 Doug Goldstein : > On Mon, Jul 2, 2012 at 4:44 PM, Matthias Bolte > wrote: >> --- >> src/esx/esx_vi.c | 111 >> ++ >> src/esx/esx_vi.h | 18 + >> 2 files cha

Re: [libvirt] [PATCH 0/3] esx: Storage volume up- and download

2012-07-03 Thread Matthias Bolte
2012/7/3 Doug Goldstein : > On Mon, Jul 2, 2012 at 4:44 PM, Matthias Bolte > wrote: >> I started the download part and the stream driver quite a while ago >> but stopped and put it aside as I realized that the storage volume >> API up- and download functions assume one fi

[libvirt] [PATCH 0/3] esx: Storage volume up- and download

2012-07-02 Thread Matthias Bolte
I started the download part and the stream driver quite a while ago but stopped and put it aside as I realized that the storage volume API up- and download functions assume one file per volume. This is a problem with ESX as a VMDK can consist of two files. To solve this now I added two new flags: M

[libvirt] [PATCH 3/3] esx: Add volume upload and download to the storage driver

2012-07-02 Thread Matthias Bolte
d int flags) { int result = -1; @@ -1668,6 +1934,8 @@ static virStorageDriver esxStorageDriver = { .volLookupByPath = esxStorageVolumeLookupByPath, /* 0.8.4 */ .volCreateXML = esxStorageVolumeCreateXML, /* 0.8.4 */ .volCreateXMLFrom = esxStorageVolumeCreateXMLFrom, /* 0.8.7 *

[libvirt] [PATCH 2/3] esx: Extend esxVI_CURL_Download for partial downloads

2012-07-02 Thread Matthias Bolte
--- src/esx/esx_driver.c |2 +- src/esx/esx_vi.c | 27 +-- src/esx/esx_vi.h |3 ++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index db2144c..95b9286 100644 --- a/src/esx/esx_driver.c +++ b/s

[libvirt] [PATCH 1/3] esx: Wrap libcurl multi handle

2012-07-02 Thread Matthias Bolte
--- src/esx/esx_vi.c | 111 ++ src/esx/esx_vi.h | 18 + 2 files changed, 129 insertions(+), 0 deletions(-) diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 5b5ab69..48718b6 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@

Re: [libvirt] [PATCH] esx_storage_driver: Add API to upload volumes (virStorageVolUpload for ESX storage driver)

2012-07-01 Thread Matthias Bolte
2012/6/30 Ata Bohra : > Patch to add API to upload Volume contents using ESX driver. As stream > driver is not supported for ESX, I have used libcurl to transfer the volume, > second, using flags here to pass > file descriptor of the source file. This might work for your testing but cannot be incl

Re: [libvirt] [PATCHv2 variant 2] snapshot: implement new APIs for esx and vbox

2012-06-17 Thread Matthias Bolte
orth posting. > >  src/esx/esx_driver.c |   50 ++ >  src/vbox/vbox_tmpl.c |   73 > ++ >  2 files changed, 123 insertions(+) ACK, to this one to as it is just a short version of variant 1, so you got to choose :) -- Matthias B

Re: [libvirt] [PATCHv2 variant 1] snapshot: implement new APIs for esx and vbox

2012-06-17 Thread Matthias Bolte
; +    } > + > +    /* Check that snapshot exists.  If so, there is no metadata.  */ > +    if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) > +        goto cleanup; > + > +    ret = 0; > + > +cleanup: VBOX_RELEASE(snap); is missing here. > +    VBOX

[libvirt] Linker error in gnulib test-binary-io.c

2012-06-17 Thread Matthias Bolte
ry-io.o: In function `main': [...]/test-binary-io.c:54: undefined reference to `set_binary_mode' collect2: ld returned 1 exit status -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] esx: Fix memory leaks in error paths related to transferred ownership

2012-05-13 Thread Matthias Bolte
2012/5/7 Michal Privoznik : > On 06.05.2012 19:39, Matthias Bolte wrote: >> Appending an item to a list transfers ownership of that item to the >> list owner. But an error can occur in between item allocation and >> appending it to the list. In this case the item has to b

[libvirt] [PATCH] esx: Fix memory leaks in error paths related to transferred ownership

2012-05-06 Thread Matthias Bolte
Appending an item to a list transfers ownership of that item to the list owner. But an error can occur in between item allocation and appending it to the list. In this case the item has to be freed explicitly. This was not done in some special cases resulting in possible memory leaks. Reported by

Re: [libvirt] [PATCH 3/7] Coverity: Fix resource leak in esx driver

2012-05-03 Thread Matthias Bolte
propertySpec->type = NULL; >     } > > +    esxVI_ObjectSpec_Free(&objectSpec); > +    esxVI_PropertySpec_Free(&propertySpec); >     esxVI_PropertyFilterSpec_Free(&propertyFilterSpec); >     esxVI_ManagedObjectReference_Free(&propertyFilter); >     VIR_FREE(vers

Re: [libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete

2012-04-23 Thread Matthias Bolte
Am 23. April 2012 18:48 schrieb Eric Blake : > On 04/23/2012 02:29 AM, Jean-Baptiste Rouault wrote: >> On Sunday 22 April 2012 10:35:59 Matthias Bolte wrote: >>> vboxArray is not castable to a COM item type. vboxArray is a >>> wrapper around the XPCOM and MSCOM specific

Re: [libvirt] [PATCH] vbox: avoid provoking assertions in VBoxSVC

2012-04-22 Thread Matthias Bolte
Am 20. April 2012 08:48 schrieb Matthias Bolte : > Am 20. April 2012 01:07 schrieb Eric Blake : >> On 04/17/2012 10:50 AM, Eric Blake wrote: >>> On 04/13/2012 07:04 AM, Jean-Baptiste Rouault wrote: >>>> Passing a NULL pointer to IMachine::delete virtualbox API &

Re: [libvirt] [PATCH] build: avoid type-punning in vbox

2012-04-22 Thread Matthias Bolte
Am 20. April 2012 08:53 schrieb Matthias Bolte : > Am 20. April 2012 01:36 schrieb Eric Blake : >> Commit 78345c68 makes at least gcc 4.1.2 on RHEL 5 complain: >> >> cc1: warnings being treated as errors >> In file included from vbox/vbox_V4_0.c:13: >&

[libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete

2012-04-22 Thread Matthias Bolte
vboxArray is not castable to a COM item type. vboxArray is a wrapper around the XPCOM and MSCOM specific array handling. In this case we can avoid passing NULL as an empty array to IMachine::Delete by passing a dummy IMedium* array with a single NULL item. --- Jean-Baptiste, I can not reproduce t

Re: [libvirt] [PATCH] win32: Properly handle TlsGetValue returning NULL

2012-04-22 Thread Matthias Bolte
Am 22. April 2012 04:32 schrieb Eric Blake : > On 04/21/2012 11:11 AM, Matthias Bolte wrote: >> virThreadSelf tries to access the virThreadPtr stored in TLS for the >> current thread via TlsGetValue. When virThreadSelf is called on a thread >> that was not created via virT

Re: [libvirt] [PATCH] Win32 compatibility for 0.9.11

2012-04-21 Thread Matthias Bolte
Am 7. April 2012 20:23 schrieb Marcel Müller : > Hello everyone, > > > > I tried to build libvirt-0.9.11 for Windows using the MSYS Build Script > provided by Matthias Bolte and noticed that there were two problems which > made libvirt unusable. > > 1)  Whenever

[libvirt] [PATCH] win32: Properly handle TlsGetValue returning NULL

2012-04-21 Thread Matthias Bolte
virThreadSelf tries to access the virThreadPtr stored in TLS for the current thread via TlsGetValue. When virThreadSelf is called on a thread that was not created via virThreadCreate (e.g. the main thread) then TlsGetValue returns NULL as TlsAlloc initializes TLS slots to NULL. virThreadSelf can b

Re: [libvirt] ESX driver connection private data fix

2012-04-21 Thread Matthias Bolte
> attempting to use anything in the struct. > > Cleanly applied to git from this afternoon, built and successfully > tested on a Fedora 16/x86_64 VM accessing an ESXi 4.1 node. Sorry for the delayed response. Thanks for debugging and reporting this problem. ACK, I applied and pushed your patch. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] build: avoid type-punning in vbox

2012-04-20 Thread Matthias Bolte
it for being non-NULL because the 0 tells it that it's an empty array. But still this is wrong and might crash on MSCOM. I might come up with a proper solution tomorrow. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] vbox: avoid provoking assertions in VBoxSVC

2012-04-20 Thread Matthias Bolte
gs being treated as errors > In file included from vbox/vbox_V4_0.c:13: > vbox/vbox_tmpl.c: In function 'vboxDomainUndefineFlags': > vbox/vbox_tmpl.c:5298: warning: dereferencing type-punned pointer will > break strict-aliasing rules [-Wstrict-aliasing] I think we need a new vboxArrayPass/Set function to get this right. I might have time to take care of this tomorrow, if nobody fixed it before then. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Making the Thread-safety issues with vbox driver ?

2012-04-19 Thread Matthias Bolte
Am 19. April 2012 12:51 schrieb Jean-Baptiste Rouault : > On Wednesday 04 April 2012 17:56:12 Jean-Baptiste Rouault wrote: >> On Monday 16 January 2012 11:34:53 Matthias Bolte wrote: >> > Okay, without looking deeper into this here are some ideas: >> > >> > The

Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-08 Thread Matthias Bolte
rtificate. The one you just created and used to sign the new SSL certificate with. On a Debian-based system you need to do the following as root to trust the new CA certificate and make libcurl find it: # mkdir /usr/share/ca-certificates/esx-certs # cp /etc/pki/CA/cacert.pem /usr/share/ca-certificates/esx-certs/ # echo esx-certs/cacert.pem >> /etc/ca-certificates.conf # update-ca-certificates I've no clue how to do this on a Red Hat Linux-based system, that's your part to figure out :) Now curl and virsh should work as expected. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [Patch v2] vmx: Better Workstation vmx handling

2012-02-24 Thread Matthias Bolte
and pushed, thanks. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/3] xml: output memory unit for clarity

2012-02-23 Thread Matthias Bolte
te "units" (plural) instead of "unit"? As a value can only have one unit the attribute name "units" is misleading. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] vmx: Better Workstation vmx handling

2012-02-22 Thread Matthias Bolte
2012/2/22 Matthias Bolte : > And this needs extra testcases in the vmx2xml and xml2vmx tests to > cover this additions to the VMX parser before I can ACK it. The test suite already has some actual in-the-wild ESX and GSX VMX config files. I suggest you add some actual VMX files for Works

Re: [libvirt] [PATCH 1/2] vmware: implement domainXMLFromNative

2012-02-22 Thread Matthias Bolte
2012/2/22 Jean-Baptiste Rouault : > --- >  src/vmware/vmware_driver.c |   31 +++ >  1 files changed, 31 insertions(+), 0 deletions(-) ACK. This one is good and independent from the second patch, so I push it now. -- Matthias Bolte http://photron.blo

Re: [libvirt] [PATCH 2/2] vmx: Better Workstation vmx handling

2012-02-22 Thread Matthias Bolte
R_DOMAIN_NET_TYPE_USER; > +        (*def)->model = virtualDev; > + > +        virtualDev = NULL; >     } else if (STRCASEEQ(connectionType, "custom")) { >         (*def)->type = VIR_DOMAIN_NET_TYPE_BRIDGE; >         (*def)->model = virtualDev; You're missing the coun

Re: [libvirt] [PATCH] esx: Correctly disable HTTP Expect header usage of libcurl

2012-02-21 Thread Matthias Bolte
2012/2/20 Eric Blake : > On 02/20/2012 02:38 PM, Matthias Bolte wrote: >> Adding "Expect:" to the header list stops libcurl from sending a >> Expect header at all. >> >> Before, a dummy Expect header was added that might confuse HTTP >> proxies and r

[libvirt] [PATCH] esx: Correctly disable HTTP Expect header usage of libcurl

2012-02-20 Thread Matthias Bolte
Adding "Expect:" to the header list stops libcurl from sending a Expect header at all. Before, a dummy Expect header was added that might confuse HTTP proxies and result in HTTP error code 417 being reported. --- src/esx/esx_vi.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

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

2012-02-07 Thread Matthias Bolte
ruct has a virtType member that holds the required information? -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

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

2012-02-06 Thread Matthias Bolte
; +   return 0; > > ACK.  It looks a lot shorter than v4, which is a good thing :) > Maybe I miss something here because I didn't follow the whole version history, but doesn't this result in using Qumranet's OUI for all generated WWN's in libvirt, also for ESX and

Re: [libvirt] [PATCH] vmware: detect when a domain was shut down from the inside

2012-02-03 Thread Matthias Bolte
mation from a virDomainObj. A more general question: is this driver supposed to work properly when someone uses vmrun to alter a VMs behind libvirt's back? If that's the case then maybe this driver should not cache anything at all and work like the vSphere, Hyper-V or VirtualBox driver. They always query the hypervisor for information and cache nothing. I'm not sure what's the best approach here. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] hyperv connection

2012-01-05 Thread Matthias Bolte
o open a HTTPS connection to the HTTP port. This is why you get an error about the SSL connection. Try this instead virsh -c hyperv://192.168.58.231/?transport=http This sets the transport to HTTP and the port to 5985. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Libvirt java from Windows

2012-01-04 Thread Matthias Bolte
Libvirt INSTANCE = (Libvirt) Native.loadLibrary("virt-0", Libvirt.class); Also make sure that the Java VM can find libvirt-0.dll at all. It needs to be in the PATH or in the working directory of you application. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [libvirt-users] How to connect to a remote VM ESXi server with Python language?

2011-12-28 Thread Matthias Bolte
need to use libvirt.openAuth() instead of libvirt.open(). openAuth() allows to pass credentials via a callback mechanism. There is a Python example in the libvirt codebase that does this, see http://libvirt.org/git/?p=libvirt.git;a=blob;f=examples/python/esxlist.py -- Matthias Bolte http://pho

Re: [libvirt] libvirt hyper-v

2011-12-10 Thread Matthias Bolte
es to open a TLS session with the WinRM server on the unencrypted port 5985 on your Hyper-V host but fails with a TLS related error message. The solution is to upgrade your libvirt version to 0.9.5 or newer and try again with the same virsh command. Also make sure that Hyper-V support is enabled

Re: [libvirt] [PATCH] Fix uninitialized variable in NWfilter IP learning code

2011-11-23 Thread Matthias Bolte
e here. I don't think that this is intended. Did you mean to initialize ret to zero on declaration, or put ret = 0 in an else branch here instead? -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [libvirt-users] listDomains() not working on Xen

2011-11-15 Thread Matthias Bolte
if someone could help > me. Your problem is probably not related to your code or the Java bindings at all. Did you check whether 'virsh list' shows active domains for Xen? I guess your problem is that libvirt doesn't recognize your active Xen domains form some reason. Therefore, &#

Re: [libvirt] [PATCH] Add missing defaultConsoleTargetType callback for AppArmour

2011-11-07 Thread Matthias Bolte
                             ctl->hvm, >                                          ctl->arch, ACK with ctl->caps instead of caps. I tested it with that fixed and it works. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 7/7] Fix default console type setting

2011-11-05 Thread Matthias Bolte
x27; console (pty): '--dryrun -r -u libvirt-----0123456789ab': FAIL: exited with '1' console (pipe): '--dryrun -r -u libvirt-----0123456789ab': FAIL: virt-aa-helper-test -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] qemu: allow getting < max typed parameters

2011-11-02 Thread Matthias Bolte
t any rate, thanks for fixing up my mess. Are you compiling with -O0? Because gcc reports/detects some uninitialized warnings only with -O2, while it doesn't warn with -O0. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] API: document scheduler parameter names

2011-11-02 Thread Matthias Bolte
xend_internal.c (xenDaemonGetSchedulerParameters) > (xenDaemonSetSchedulerParameters): Likewise. > * src/lxc/lxc_driver.c (lxcSetSchedulerParametersFlags) > (lxcGetSchedulerParametersFlags): Likewise. > --- You missed the ESX allocation scheduler with reservation, limit and shares parameters. -- Matthi

Re: [libvirt] [PATCH] esx: Support vSphere 5.x

2011-11-01 Thread Matthias Bolte
ing VMX entry 'virtualHW.version' to be 4, 7 or 8 " "but found %lld"), virtualHW_version); goto cleanup; Actually we're currently in feature freeze for libvirt 0.9.7, but as this is a pure addition patch, that will not break existin

Re: [libvirt] [PATCHv2] esx: Support folders in the path of vpx:// connection URIs

2011-11-01 Thread Matthias Bolte
2011/11/1 Eric Blake : > On 11/01/2011 10:21 AM, Matthias Bolte wrote: >> >> Allow the datacenter and compute resource parts of the path >> to be prefixed with folders. Therefore, the way the path is >> parsed has changed. Before, it was split in 2 or 3 items and

[libvirt] [PATCHv2] esx: Support folders in the path of vpx:// connection URIs

2011-11-01 Thread Matthias Bolte
Allow the datacenter and compute resource parts of the path to be prefixed with folders. Therefore, the way the path is parsed has changed. Before, it was split in 2 or 3 items and the items' meanings were determined by their positions. Now the path can have 2 or more items and the the vCenter serv

[libvirt] [PATCH] python: Fix documentation of virStream recv

2011-10-31 Thread Matthias Bolte
This was fixed in be757a3f7baf93b for libvirt.c. --- I'm pushing this one under the trivial rule. python/libvirt-override-virStream.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/python/libvirt-override-virStream.py b/python/libvirt-override-virStream.py index 92e6

Re: [libvirt] [Libvirt-announce] Start of freeze for libvirt-0.9.7 and availability of rc1

2011-10-31 Thread Matthias Bolte
lease give it a try ! > >  thanks in advance, > > Daniel Compiles fine on MinGW. I also did a quick test with VirtualBox 4.1 on Windows and that works as well. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] vbox: Add support for VirtualBox 4.1

2011-10-29 Thread Matthias Bolte
2011/10/25 Eric Blake : > On 10/23/2011 08:10 AM, Matthias Bolte wrote: >> >> Deal with the incompatible changes in the VirtualBox 4.1 API. >> >> INetworkAdapter has its different AttachTo* method replaced by >> a settable attachmentType property. >> >&

Re: [libvirt] [PATCH] vbox: Support shared folders

2011-10-29 Thread Matthias Bolte
2011/6/14 Eric Blake : > On 06/07/2011 05:38 AM, Matthias Bolte wrote: >> Shared folders are handled as filesystems and can also be hotplugged. >> --- >> >> Currently this just maps shared folder to a filesystem element with type >> mount. The filesystem element ha

Re: [libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen once again

2011-10-29 Thread Matthias Bolte
2011/7/21 Eric Blake : > On 07/21/2011 07:17 AM, Matthias Bolte wrote: >> >> privP->session->error_description is a list and in order to get the >> complete error message all parts of the list should be concatenated. >> xenapiSessionErrorHandler does this when it

Re: [libvirt] [PATCH V3 3/4] Extend NWFilter parameter parser to cope with lists of values

2011-10-24 Thread Matthias Bolte
aren't the same from the NWFilter's point-of-view then this needs to be fixed to have NWFilter preserve the exact order of elements. If it's the same then there's no problem here. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH V2 00/10] Make inner workings of nwfilters more flexible + extensions

2011-10-19 Thread Matthias Bolte
2011/10/19 David Stevens : > > -Matthias Bolte wrote: - > >> >>Well, you miss the point that nwfilters is meant as a general >>firewall >>interface. ebtables/iptables just happens to be an implementation of >>this interface. Using ebtables/iptables

Re: [libvirt] [PATCH V2 00/10] Make inner workings of nwfilters more flexible + extensions

2011-10-19 Thread Matthias Bolte
n, but with this general interface there is at least the possibility to configure the different firewalls of different hypervisors via libvirt. -- Matthias Bolte http://photron.blogspot.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

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

2011-10-18 Thread Matthias Bolte
2011/10/18 Matthias Bolte : > 2011/10/12 Jiri Denemark : >> --- >> Notes: >>    Version 3: >>    - no changes >> >>    Version 2: >>    - new patch >> >>  src/esx/esx_driver.c       |   18 ++ >>  src/hyperv/hyperv_

<    1   2   3   4   5   6   7   8   9   10   >