[libvirt] ESX error while freeing inherited objects
by Ata Bohra
Hi All, Freeing of an object having inheritance depth >=2 throws an error such as:" internal error Call to esxVI_<grand_parent>_Free for unexpected type 'Child'. " For instance: Below code snippet is from esx_vi_generator.input (modified) object VirtualDevice
Int key r
Description deviceInfo o
VirtualDeviceBackingInfo backing o
VirtualDeviceConnectInfo connectable o
Int controllerKey o
Int unitNumber o
end
object VirtualController extends VirtualDevice
Int busNumber r
Int device ol
end
object VirtualIDEController extends VirtualController
end object VirtualDeviceConfigSpec
VirtualDeviceConfigSpecOperation operation o
VirtualDeviceConfigSpecFileOperation fileOperation o
VirtualDevice device r
end
object VirtualMachineConfigSpec...
VirtualDeviceConfigSpec deviceChange ol..end On free of "VirtualMachineConfigSpec", I hit below error:"libvir: ESX Driver error : internal error Call to esxVI_VirtualDevice_Free for unexpected type 'VirtualIDEController'" But if I remove VirtualController and include its fields directly to VirtualIDEController, error is resolved. Please let me know if I'm missing anything, else, it seems like a bug with generated code. While debugging the error seems to come from: esx_vi_types.c: /*
* Macros to implement dynamic dispatched functions
*/#define ESX_VI__TEMPLATE__DISPATCH(_actual_type, _actual_type_name, __type, \
_dispatch, _error_return) \
switch (_actual_type) { \
_dispatch \
\
case esxVI_Type_##__type: \
break; \
\
default: \
virReportError(VIR_ERR_INTERNAL_ERROR, \
_("Call to %s for unexpected type '%s'"), \
__FUNCTION__, _actual_type_name); \
return _error_return; \
}
Thanks!Ata
12 years, 3 months
[libvirt] [PATCH] ESX: append CURL headers to fix serviceContent entities
by Ata E Husain Bohra
Append curl headers with "SOAPAction" header to populate
serviceContent object entities which are otherwise missing.
---
src/esx/esx_vi.c | 2 ++
src/esx/esx_vi_generator.input | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 99c1eb1..a379183 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -322,6 +322,8 @@ esxVI_CURL_Connect(esxVI_CURL *curl, esxUtil_ParsedUri *parsedUri)
* approx. 2 sec per POST operation.
*/
curl->headers = curl_slist_append(curl->headers, "Expect:");
+ curl->headers = curl_slist_append(curl->headers,
+ _("SOAPAction: \"urn:vim25\""));
if (curl->headers == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/src/esx/esx_vi_generator.input b/src/esx/esx_vi_generator.input
index 22c114e..236dcb3 100644
--- a/src/esx/esx_vi_generator.input
+++ b/src/esx/esx_vi_generator.input
@@ -1008,6 +1008,8 @@ object ServiceContent
ManagedObjectReference clusterProfileManager o
ManagedObjectReference complianceManager o
ManagedObjectReference localizationManager o
+ ManagedObjectReference storageResourceManager o
+ ManagedObjectReference guestOperationsManager o
end
@@ -1073,6 +1075,7 @@ object UserSession
DateTime lastActiveTime r
String locale r
String messageLocale r
+ Boolean extensionSession o
end
--
1.7.9.5
12 years, 3 months