'Not supported on the object error' while deploying OVF
Hello, I am trying to make a python script to deploy OVF on vSphere. https://gist.github.com/goindwalia/48a5f9ab6a2f4eedfdba The error I am getting is leading me no where:
(vmodl.fault.NotSupported) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'The operation is not supported on the object.',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) []
}
The lease is getting failed after initialising. I am having strong feeling that there is something wrong while creating ImportVApp or CreateImportSpec. I have tried 2-3 different minimal OVFs so far. Kindly help me rectifying this error.
Having the same issue. Also on VSphere 5.5
Did you ever find a solution?
You're probably pointing the script at your vCenter IP instead of an individual host. Someone else had this issue over in the community samples repo: https://github.com/vmware/pyvmomi-community-samples/issues/54
Looking at your code, nothing happens with the lease. Eventually it will timeout. There is now a full sample for deploying OVF:
https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py
@stormbeard @derchrisuk changing to ESXi host instead of vCenter address fixes the issue, but could the sample code be made to work with vCenter? When deploying to an ESX host directly, vCenter does not list any progress (Recent Tasks) of any type.
Have you tried to deploy an OVF via vSphere Client connected to a vCenter? Is this working? Then you could sniff what it is doing using Onyx, and use that to create the correct pyvmomi specs.
@derchrisuk yes of course, we deploy using the vSphere client connected to vCenter all the time. I found the vSphere logs (client request) to vCenter for deploying a OVF. I'll try to model this via pyvmomi and update the results there.
@derchrisuk well that was simple.
Changing one line makes it work for both ESXi host and directly to vCenter:
lease = objs["resource pool"].ImportVApp(import_spec.importSpec, objs["datacenter"].vmFolder);
I think you can close this issue now. Also if you guys want, I can issue a pull-request for the sample/deploy_ovf.py
That would be nice
@saad-cliqr would you please also replace curl with requests in the same patch
closing this issue as the sample is fixed by @saad-cliqr. Thanks @saad-cliqr