Closed linuxcrash closed 2 years ago
I just tried out to run the Ubuntu OVA using VMware Workstation and directly importing it through the UI in VMware Workstation. This way the OVF properties defined are working fine.
Therefore I can clearly say that the Ubuntu cloud image uses the OVF datasource but in the Terraform/ovftool/ESX case it seems the ovf properties are not properly passed in to the VM.
VMware Workstation Screenshot:
Have you looked at this??? https://github.com/josenk/terraform-provider-esxi/issues/140
Did you look at the documentation about OVF and cloud init? https://github.com/josenk/terraform-provider-esxi/tree/master/examples-0.13/06%20OVF%20Properties
This method of injecting properties into the VM works with ovf/ova sources only. The guestinfo method ("05 CloudInit and Templates" example) can be used with any source type (vmx, ovf, ova, clone_from_vm), but requires "Cloud-Init for VMware" to be pre-installed on the source.
I doubt those public OVF images for "Cloud-init for vmware" installed...
@josenk if you look at my main.tf file reported in the issue, you might find that this is exactly your example file from here: https://github.com/josenk/terraform-provider-esxi/tree/master/examples-0.13/06%20OVF%20Properties
But it does NOT work! So I have verified that the OVA properties are listed from the Ubuntu provided cloud image using the "ovatool" and they are all shown in the output. But for whatever reason when using your provider, these properties seem not to be applied when terraform creates the VM on an ESX server. So I wonder what is missing here...
@josenk bumping the issue - Any news or inputs here?
Try adding this setting to your main.tf.
ovf_properties_timer = 30
Let me know if it works better.
@josenk thank you for that hint! Adding and increasing ovf_properties_timer = 60 made things starting to work! Maybe something that should be added to the example description in the OVF example section!
I will be doing an update soon to address this...
A little history. Back in V1.6.0, it was working fine, but then along the way the default ovf_properties_timer got set to 0 by mistake. So if you manually set it, things start working...
In the next release, I will make sure the default is set correctly. The 06 example will also have some extra details...
Describe the bug I'm trying to get the latest Ubuntu 20.04 cloud image configured through OVF Properties but after the OVA upload into ESX and having the VM powered on, nothing happens.
I have noticed that the Ubuntu cloud image does not contain the vsphere-cloudinit datasource but from your documentation there is no hint this is needed when using OVF Properties.
To Reproduce Steps to reproduce the behavior:
Expected behavior After the OVA upload to ESX, the VM is started and the OVF Properties get applied to the VM, essentially configuring the Ubuntu system using cloud-init from the passed in user-data OVF Property.
Terraform files Main.TF
Desktop (please complete the following information):