Announcing the Packer Plugin for VMware vSphere v2.3.0
Packer Plugin for VMware vSphere v2.3.0 was released on 03 August 2026!
This release expands how vsphere-clone starts a build. Inventory templates still work. So do content library items, and local or remote OVF/OVA packages. Remote sources support HTTP, HTTPS, and HTTPS with basic authentication. Pick the source that matches where the image already lives, then customize, provision, and publish as usual.
v2.3.0 also expands vSphere data sources for inventory lookups in HCL, ships project documentation at vmware.github.io/packer-plugin-vsphere, and includes reliability improvements, clearer validation, broader test coverage, and dependency updates.
Expanded Clone Sources¶
vsphere-clone now has three source options:
templatefor inventory templatescontent_library_sourcefor content library itemsovf_sourcefor packages on disk, or remote over HTTP, HTTPS, or HTTPS with basic auth
Use exactly one per build. Validation rejects mixed sources so the config stays explicit. After the source resolves, the rest of the build path is the same.
Content Library¶
source "vsphere-clone" "example" {
# ... connection and destination settings ...
content_library_source {
library = "Example Content Library"
name = "example-template"
}
}
That works for VM templates and OVF templates in the library. For OVF library items, vCenter deploys the item from the library. The plugin doesn't download and re-upload the package files.
OVF / OVA¶
ovf_source takes either a local path or a remote url. Both .ovf and .ova are supported:
| Format | What It Is |
|---|---|
.ovf | OVF descriptor. Companion disk files must sit in the same directory. |
.ova | Single archive that packages the OVF descriptor and disk files together. |
The path or URL must end in .ovf or .ova. For a multi-file .ovf package, keep the descriptor and its disk files together on disk or at the remote location. An .ova is self-contained, so one file or URL is enough.
Local package:
source "vsphere-clone" "example" {
# ... connection and destination settings ...
ovf_source {
path = "./artifacts/example.ova"
}
}
Remote packages use url instead of path. Supported transports:
| Transport | How It Works |
|---|---|
| HTTP | url with http:// |
| HTTPS | url with https:// |
| HTTPS with basic auth | url with https://, plus username and password |
username and password are only valid with url, and they must be set together. Put them in sensitive variables. For HTTPS endpoints with self-signed or otherwise non-standard certificates, set skip_tls_verify = true when you intentionally want to skip certificate validation. It defaults to false.
variable "ovf_username" {
type = string
sensitive = true
}
variable "ovf_password" {
type = string
sensitive = true
}
source "vsphere-clone" "example" {
# ... connection and destination settings ...
ovf_source {
url = "https://packages.example.com/artifacts/example.ova"
username = var.ovf_username
password = var.ovf_password
skip_tls_verify = false
}
}
Template-backed and OVF-backed sources don't take the same clone options. Linked clones stay with inventory templates. OVF-backed builds get vapp.deployment_option. Check the compatibility matrix in the vsphere-clone docs before you port an existing template to a new source type.
OVF/OVA deploy is unified behind one shared path across these source types, so behavior stays consistent as more source shapes land later.
Expanded Data Sources¶
vsphere-virtualmachine shipped in v2.1.0. This release adds the rest of the inventory lookups:
| Data Source Type | Typical Use |
|---|---|
vsphere-compute-cluster | Resolve a cluster and root resource pool |
vsphere-content-library | Look up a content library |
vsphere-content-library-item | Look up a library item by name, type, or filters |
vsphere-datastore | Resolve a datastore, optionally by free space |
vsphere-datastore-cluster | Resolve a datastore cluster |
vsphere-host | Resolve an ESX host |
vsphere-network | Resolve a network |
vsphere-resource-pool | Resolve a nested resource pool path |
vsphere-virtualmachine | Resolve a template or VM by filter |
Datastore lookup:
data "vsphere-datastore" "target" {
vcenter_server = var.vcenter_server
username = var.vcenter_username
password = var.vcenter_password
name = "*-nfs-*"
most_free_space = true
}
source "vsphere-iso" "example" {
# ... other settings ...
datastore = data.vsphere-datastore.target.name
}
Filters vary by type: globs, regex, tags, host or cluster scope, most free space. Use the data source documentation for field details.
Documentation¶
Local, beautiful, user freindly documentation now lives within the repository vmware.github.io/packer-plugin-vsphere using Zensical and GitHub Pages. The developer.hashicorp.com documentation is still generated and supported.
Checksums and PGP signatures ship with every release. The release verification page covers how to check them.
Other Enhancements¶
Beyond the clone sources and data sources:
- Boot delay:
boot_delay(0-10000 ms) onvsphere-isoandvsphere-clonefor a short pause before boot commands. - Validation and cleanup: Clearer clone validation errors, and safer artifact cleanup.
- Tests: Expanded unit and acceptance coverage for the new source and data source paths.
- Dependencies: Go 1.26.x,
hashicorp/packer-plugin-sdkSDK, andvmware/govmomiSDK updates.
Upgrade¶
Bump the plugin, then refresh:
packer {
required_plugins {
vsphere = {
source = "github.com/vmware/vsphere"
version = ">= 2.3.0"
}
}
}
Existing template clone builds keep working. The new source blocks are additive. Choose the source that matches where your image lives, and check the compatibility table in the documentation when you adopt content_library_source or ovf_source.
Disclaimer
This is not an official VMware by Broadcom document. This is a personal blog post.
The information is provided as-is with no warranties and confers no rights.
Please, refer to official documentation for the most up-to-date information.