0

I'm hitting an issue with a script that is built on pyVmomi trying to upload an OVA to vSphere. This script is run on a VM that has network connectivity to the vCenter, but not to the compute host.

The script is very similar to the community example https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py. The URL that is obtained from the lease is for one of the compute hosts rather than the vCenter, i.e. at the equivalent to this line: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py#L197. That obviously doesn't work, when we later use requests to upload to that address, as we don't have network connectivity.

Eventually we hit an error of the form:

pyVmomi.VmomiSupport.SystemError: (vmodl.fault.SystemError) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = <unset>,
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   reason = "HTTPSConnectionPool(host='10.2.3.4', port=443): Max retries exceeded with url: /nfc/52479c2d-e906-c312-7ee3-fe108cae2d7e/disk-0.vmdk (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8970337fd0>: Failed to establish a new connection: [Errno 110] Connection timed out',))"
}

Where 10.2.3.4 is the compute host rather than the vCenter.

Any advice would be appreciated, whether that is a code fix here, or an alternative library/tool that doesn't require network connectivity to the compute host.

1 Answers1

0

I had same issue - I got confirmation from the vendor that while it all work seamless from the web GUI to VCenter, that when using pyvimomi/ansible/terraform/powershell that you need direct host IP connectivity.

Optical Carrier
  • 368
  • 1
  • 4
  • 14