|
|
|
|
@ -22,9 +22,9 @@ each category, the available configuration keys are alphabetized.
|
|
|
|
|
|
|
|
|
|
Required:
|
|
|
|
|
|
|
|
|
|
- `cluster` (string) - The cluster to upload the VM to. If you do not have a
|
|
|
|
|
cluster defined, you can instead provide the IP address of the esx host
|
|
|
|
|
that you want to upload to.
|
|
|
|
|
- `cluster` (string) - The cluster or host to upload the VM to. This can be
|
|
|
|
|
either the name of the cluster, or the IP address of the esx host that you
|
|
|
|
|
want to upload to.
|
|
|
|
|
|
|
|
|
|
- `datacenter` (string) - The name of the datacenter within vSphere to add
|
|
|
|
|
the VM to.
|
|
|
|
|
@ -71,3 +71,81 @@ Optional:
|
|
|
|
|
|
|
|
|
|
- `options` (array of strings) - Custom options to add in ovftool. See
|
|
|
|
|
`ovftool --help` to list all the options
|
|
|
|
|
|
|
|
|
|
# Example
|
|
|
|
|
|
|
|
|
|
The following is an example of the vSphere post-processor being used in
|
|
|
|
|
conjunction with the null builder and artifice post-processor to upload a vmx
|
|
|
|
|
to a vSphere cluster.
|
|
|
|
|
|
|
|
|
|
You can also use this post-processor with the vmx artifact from a vmware build.
|
|
|
|
|
|
|
|
|
|
<Tabs>
|
|
|
|
|
<Tab heading="JSON">
|
|
|
|
|
|
|
|
|
|
``` json
|
|
|
|
|
{
|
|
|
|
|
"builders": [
|
|
|
|
|
{
|
|
|
|
|
"type": "null",
|
|
|
|
|
"communicator": "none"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"post-processors": [
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"type": "artifice",
|
|
|
|
|
"files":["output-vmware-iso/packer-vmware-iso.vmx"]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "vsphere",
|
|
|
|
|
"keep_input_artifact": true,
|
|
|
|
|
"vm_name": "packerparty",
|
|
|
|
|
"vm_network": "VM Network",
|
|
|
|
|
"cluster": "123.45.678.1",
|
|
|
|
|
"datacenter": "PackerDatacenter",
|
|
|
|
|
"datastore": "datastore1",
|
|
|
|
|
"host": "123.45.678.9",
|
|
|
|
|
"password": "SuperSecretPassword",
|
|
|
|
|
"username": "Administrator@vsphere.local"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
<Tab heading="HCL2">
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
source "null" "example" {
|
|
|
|
|
communicator = "none"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build {
|
|
|
|
|
sources = [
|
|
|
|
|
"source.null.example"
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
post-processors{
|
|
|
|
|
post-processor "artifice"{
|
|
|
|
|
files = ["output-vmware-iso/packer-vmware-iso.vmx"]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
post-processor "vsphere"{
|
|
|
|
|
keep_input_artifact = true
|
|
|
|
|
vm_name = "packerparty"
|
|
|
|
|
vm_network = "VM Network"
|
|
|
|
|
cluster = "123.45.678.1"
|
|
|
|
|
datacenter = "PackerDatacenter"
|
|
|
|
|
datastore = "datastore1"
|
|
|
|
|
host = "123.45.678.9"
|
|
|
|
|
password = "SuperSecretPassword"
|
|
|
|
|
username = "Administrator@vsphere.local"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
</Tabs>
|
|
|
|
|
|