Deploying VMware vSphere Virtual Machines with Packer & Terraform
14 min readJan 7, 2020
This story is compatible with Packer v1.5.x or previous versions and Terraform v12.x
Today, we will take a look at how to deploy Windows and Linux virtual machines in VMware vSphere using HashiCorp Packer and HashiCorp Terraform.
1. What is Packer?
- A free open-source tool to create images or VMs in multiple platforms (Azure, AWS, Google Cloud, VMware, OpenShift, etc.), created by HashiCorp
- It runs on Windows, Unix, Linux & macOS
- Perfect to create templates, build the same image in multiple environments or demos
To automatize the creation of templates in VMware vSphere, there are two major approaches:
- Use the VMware-iso provider. This provider creates VMware VMs from an ISO file as a source. It currently supports building virtual machines on hosts running VMware Fusion for OS X, VMware Workstation for Linux & Windows, and VMware Player on Linux. It can also build machines directly on VMware vSphere Hypervisor using SSH as opposed to the vSphere API.
- Use the vSphere-iso provider. This provider created by JetBrains builds VMs on VMware vSphere directly using vSphere API. This plugin was merged into the official Packer repository and released with…