Open cbascom opened 6 months ago
Hello, cbascom! π
Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.
If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.
Hi @cbascom, i found your issue is really great. But could you please explain me a bit the flow, as im struggling to find any info about it. So we have ESXI host, remote_ovf_url and a VM where we triggered the terraform. I thought, that ESXI host will contact directly the remote_ovf_url and download the file from there without doing any connections to the VM where the tf is triggered. But according to the issue, im completely wrong, and ESXI host tries to download it through the VM, is that correct? and im also can not understand who is resolving the remote_ovf_url fqdn, saying the ESXI host in US, VM is in the UK and remote_ovf_url is a VIP which should return the closest location. In that case, it will be resolved to US, and ESXI host will try to download the ova template (which points to US) through the VM in UK?
@andrii-korchevnyi-rft
Hi @cbascom, i found your issue is really great. But could you please explain me a bit the flow, as im struggling to find any info about it.
I'm not familiar with the codebase too much, but this is what I see currently:
So the flow is:
So basically assuming I didn't miss anything, your terraform VM is downloading the OVA multiple times and uploading files contained in it to the ESXI host. The ESXI host is never doing anything with the remote_ovf_url directly.
@cbascom thank you so much for a quick answer. We captured the traffic from the VM, that runs a tf and got the same result.
Also interesting thing (maybe it will be useful to someone). We did separated the process (we manually downloaded an OVA to the VM and used local_ovf_path, we could download an OVA in 30 sec and deploy VM to the ESXI host within 4 min 30s, without separating it took more then 1h.
Community Guidelines
Description
Starting with the vSphere 6.7 API, there is an option to upgrade the current NfcLease from push to pull mode which allows the ESXi host to pull file(s) directly from the remote URL.
This would allow for getting rid of the download being proxied through the host that is running terraform. This would be a big win in cases where the machine running terraform has a slow connection to either the remote URL or the vSphere server.
Use Case(s)
When the ESXi host has direct connectivity to the remote URL, this option would allow for must faster file transfer speeds especially when the host running terraform has a slow connection to the remote URL, the ESXi host, or both.
Potential Terraform Provider Configuration
The following new parameters would be added to the vsphere_virtual_machine resource:
References