Hi,
I’m try to setup a rocky9 vmware esxi template to use with opentofu (terraform) because we need some rapid deployments.
We could use this with ubuntu based templates at any time.
Template:
I installed a very basic rocky9 server in a VM, installed the open-vm tools + cloud-init.
But: When I try to setup a machine based on this system I get two problems:
- The clone won’t connect the network interface. The same code with an ubuntu template set the interface to “connect on startup”. That’s why writing here, not in VMware or Terraform forum - this problem seems to be rocky9 related.
- I think related to this: I never get a success message back so the opentofu fails after a while even the VM is created.
I dived into the template again, configured cloud-init that it accept the vmware-tools as config provider - this is all working now. eg, it tries to run the cloud-init data. But of course fails on package install because no network.
I tried do ensure that vmtoolsd is starting AFTER the dbus (eg, inserted into vgauthd.service a line “After=dbus.service”) - but did not help
For testing I ran inside cloned machine
clout-init clean
reboot
and when network was connected before it did exactly what I wanted. So data from esxi daemon are read and pushed to the machine.
Question: Is there someone out got a esxi-template work? If so, how? What recommendation exists for setting up the VM in esxi (system type etc.)? Or is somewhere an OVA / image I can directly use as a template in ESXI for deployment with cloud-init/opentofu/terraform?
Thanks