I am trying to deploy ovf using pyVmomi. I am trying to follow this example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py.
There are two VCenter setups and there are differences. On one VCenter, I can deploy the VM. On the other, I have a failure as below:
>>> spec_result = manager.CreateImportSpec(ovfd, rp_obj, datastore_obj,spec_params)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/VmomiSupport.py", line 570, in <lambda>
self.f(*(self.args + (obj,) + args), **kwargs)
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/VmomiSupport.py", line 376, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/SoapAdapter.py", line 1350, in InvokeMethod
raise obj # pylint: disable-msg=E0702
pyVmomi.VmomiSupport.InvalidType: (vmodl.fault.InvalidType) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = '',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [],
argument = 'ManagedObjectReference'
}
Can someone point to the way on how I can troubleshoot this error? I tried to look at what this function does but couldn't find it.
I tried to set pdb trace, and it turns out that the reason it fails is that this comes back with a 500 response. On the VCenter that worked, it returns a 200 response. So why would the same call return differently?