The Packer Plugin for VMware vSphere is a plugin for creating virtual machine images for use with VMware vSphere®.
The plugin includes builders and post-processors for creating virtual machine images, depending on your desired strategy:
Builders
-
vsphere-iso- This builder creates a virtual machine, installs a guest operating system from an ISO, provisions software within the guest operating system, and then saves or exports the virtual machine as an image. Use this builder to start by creating a new image. -
vsphere-clone- This builder imports an existing virtual machine, runs provisioners on the virtual machine, and then saves exports the virtual machine as an image. Use this builder to start from an existing image as the source. -
vsphere-supervisor- This builder deploys and publishes a virtual machine to a vSphere Supervisor cluster using VM Service.
Post-Processors
-
vsphere- This post-processor uploads an artifact to a vSphere endpoint. The artifact must be a.vmx,.ova, or.ovffile. -
vsphere-template- This post-processor uses an artifact from the vSphere post-processor. It then marks the virtual machine as a template and moves it to your specified path.
-
The plugin supports versions in accordance with the Broadcom Product Lifecycle.
-
Go 1.23.12 is required to build the plugin from source.
Include the following in your configuration to automatically install the plugin when you
run packer init.
packer {
required_version = ">= 1.7.0"
required_plugins {
vmware = {
version = ">= 2.1.1"
source = "github.com/vmware/vsphere"
}
}
}For more information, please refer to the Packer documentation.
You can install the plugin using the packer plugins install command.
Examples:
-
Install the latest version of the plugin:
packer plugins install github.com/vmware/vsphere
-
Install a specific version of the plugin:
packer plugins install github.com/vmware/vsphere@v2.1.1
You can build from source by cloning the GitHub repository and running make build from
the repository root. After a successful build, the packer-plugin-vsphere binary is
created in the root directory.
To install the compiled plugin, please refer to the Packer documentation.
- Please refer to the plugin documentation for more information on the plugin usage.
Please read the code of conduct and contribution guidelines to get started.
The Packer Plugin for VMware vSphere is supported by the maintainers and the plugin community.
© Broadcom. All Rights Reserved.
The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
Licensed under the Mozilla Public License, version 2.0.