Skip to content

vmware/packer-plugin-vsphere

Packer Plugin for VMware vSphere

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 .ovf file.

  • 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.

Requirements

Installation

Using the Releases

Automatic Installation

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.

Manual Installation

You can install the plugin using the packer plugins install command.

Examples:

  1. Install the latest version of the plugin:

    packer plugins install github.com/vmware/vsphere
  2. Install a specific version of the plugin:

    packer plugins install github.com/vmware/vsphere@v2.1.1

Using the Source

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.

Documentation

  • Please refer to the plugin documentation for more information on the plugin usage.

Contributing

Please read the code of conduct and contribution guidelines to get started.

Support

The Packer Plugin for VMware vSphere is supported by the maintainers and the plugin community.

License

© Broadcom. All Rights Reserved.
The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
Licensed under the Mozilla Public License, version 2.0.