vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

[BUG] govc import.ova not working if ESXI hostnames don't don't resolve #3437

Open luisdavim opened 1 month ago

luisdavim commented 1 month ago

Describe the bug govc import.ova not working if ESXI hostnames don't resolve to an IP address.

To Reproduce Steps to reproduce the behavior:

Follow the steps in the docs to import a OVA file

Expected behavior

It should be possible to import OVA files even if the ESXI hostnames don't have a DNS record.

Affected version

latest using:

curl -Lo - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -xvzf - govc

Screenshots/Debug Output

govc import.ova -options=photon-3-kube-v1.24.17-vmsp.json -ds="${DATASTORE}" -pool="${VSPHERE_RESOURCE_POOL}" photon-3-kube-v1.24.17-vmsp.ova
[13-05-24 13:03:24] Warning: Line 104: Invalid value '1' for element 'AddressOnParent'.
[13-05-24 13:03:26] Uploading photon-3-kube-v1.24.17-vmsp-disk1.vmdk... Error: Post "https://esxi-1.vrack.vsphere.local/nfc/5291b4cd-7c0d-77c2-1308-1a1c4114baf1/disk-0.vmdk": dial tcp: lookup esxi-1.vrack.vsphere.local on 127.0.0.53:53: server misbehaving
govc: Post "https://esxi-1.vrack.vsphere.local/nfc/5291b4cd-7c0d-77c2-1308-1a1c4114baf1/disk-0.vmdk": dial tcp: lookup esxi-1.vrack.vsphere.local on 127.0.0.53:53: server misbehaving

Additional context Add any other context about the problem here.

github-actions[bot] commented 1 month ago

Howdy 🖐   luisdavim ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.