1

For a small environment I'm tasked to create automated infrastructure deployment for a couple of virtual machines running on a single ESXi host (without vCenter). The VMs should run CentOS 8 and I will use ansible later on to configure the services.

In the past I regularly used packer to build my OS image, which I can do with a standalone host as well. It will not be a template but a VM, but it works fine to create my base template. Without vCenter I cannot copy or clone the VM though as this operation is not supported on a standalone host.

How can I create (fully automated) a VM with CentOS 8 installed ideally by using terraform only? I was thinking to call packer from terraform, but its really not designed to work this way.

Daniel
  • 155
  • 9
  • 1
    Have you looked for an ESXi provider? https://github.com/josenk/terraform-provider-esxi – Aaron Copley May 23 '21 at 13:15
  • I didn't know such a thing exists. It seems to use ovftool locally to clone the new guest from an existing VM. Thats perfect. Please post it as an answer, I will accept it. Thank you! – Daniel May 23 '21 at 13:29

0 Answers0