jetbrains-infra / packer-builder-vsphere

Packer plugin for remote builds on VMware vSphere
Mozilla Public License 2.0
541 stars 175 forks source link
packer vsphere

Team project GitHub latest release GitHub downloads TeamCity build status

Deprecation notice

This plugin was merged into official Packer repository and released with Packer since version 1.5.2.

Please use modern version of Packer and report problems, feature suggestions to main Packer repository.

This repository left for history and archived.

Packer Builder for VMware vSphere

This a plugin for HashiCorp Packer. It uses native vSphere API, and creates virtual machines remotely.

vsphere-iso builder creates new VMs from scratch. vsphere-clone builder clones VMs from existing templates.

Installation

Build

Install Go and dep, run build.sh.

Or build inside a container by Docker Compose:

docker-compose run build

The binaries will be in bin/ directory.

Artifacts can be also downloaded from TeamCity builds.

Examples

See complete Ubuntu, Windows, and macOS templates in the examples folder.

Parameter Reference

Connection

VM Location

VM Location (vsphere-clone only)

Hardware

Hardware (vsphere-iso only)

Boot (vsphere-iso only)

Provision

Postprocessing

Working with Clusters

Standalone Hosts

Only use the host option. Optionally specify a resource_pool:

"host": "esxi-1.vsphere65.test",
"resource_pool": "pool1",

Clusters Without DRS

Use the cluster and hostparameters:

"cluster": "cluster1",
"host": "esxi-2.vsphere65.test",

Clusters With DRS

Only use the cluster option. Optionally specify a resource_pool:

"cluster": "cluster2",
"resource_pool": "pool1",

Required vSphere Permissions

For floppy image upload: