2017-07-09 21:45:57 -04:00
|
|
|
---
|
|
|
|
description: |
|
2017-07-18 23:10:05 -04:00
|
|
|
The Packer vSphere Template post-processor takes an artifact from the VMware-iso builder built on ESXi (i.e. remote)
|
2017-11-27 20:26:03 -05:00
|
|
|
and allows to mark a VM as a template and leaving it in a path of choice.
|
2017-07-09 21:45:57 -04:00
|
|
|
layout: docs
|
|
|
|
page_title: 'vSphere Template - Post-Processors'
|
|
|
|
sidebar_current: 'docs-post-processors-vSphere-template'
|
|
|
|
---
|
|
|
|
|
|
|
|
# vSphere Template Post-Processor
|
|
|
|
|
2017-07-10 20:52:48 -04:00
|
|
|
Type: `vsphere-template`
|
2017-07-09 21:45:57 -04:00
|
|
|
|
2017-07-19 00:44:18 -04:00
|
|
|
The Packer vSphere template post-processor takes an artifact from the VMware-iso builder built on ESXi (i.e. remote) and
|
2017-07-09 21:45:57 -04:00
|
|
|
allows to mark a VM as a template and leaving it in a path of choice.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
An example is shown below, showing only the post-processor configuration:
|
|
|
|
|
|
|
|
``` json
|
2017-11-27 20:26:03 -05:00
|
|
|
{
|
2017-07-10 20:52:48 -04:00
|
|
|
"type": "vsphere-template",
|
2017-07-10 04:13:54 -04:00
|
|
|
"host": "vcenter.local",
|
2017-07-18 23:10:05 -04:00
|
|
|
"insecure": true,
|
2017-07-10 04:13:54 -04:00
|
|
|
"username": "root",
|
2017-11-27 20:26:03 -05:00
|
|
|
"password": "secret",
|
2017-07-18 23:10:05 -04:00
|
|
|
"datacenter": "mydatacenter",
|
2017-11-27 20:26:03 -05:00
|
|
|
"folder": "/packer-templates/os/distro-7"
|
2017-07-09 21:45:57 -04:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
There are many configuration options available for the post-processor. They are
|
|
|
|
segmented below into two categories: required and optional parameters. Within
|
|
|
|
each category, the available configuration keys are alphabetized.
|
|
|
|
|
|
|
|
Required:
|
|
|
|
|
2017-11-27 20:26:03 -05:00
|
|
|
- `host` (string) - The vSphere host that contains the VM built by the vmware-iso.
|
2017-07-09 21:45:57 -04:00
|
|
|
|
2017-07-31 00:26:58 -04:00
|
|
|
- `password` (string) - Password to use to authenticate to the vSphere endpoint.
|
2017-07-09 21:45:57 -04:00
|
|
|
|
2017-07-31 00:26:58 -04:00
|
|
|
- `username` (string) - The username to use to authenticate to the vSphere endpoint.
|
2017-07-09 21:45:57 -04:00
|
|
|
|
|
|
|
Optional:
|
|
|
|
|
2017-07-18 23:10:05 -04:00
|
|
|
- `datacenter` (string) - If you have more than one, you will need to specify which one the ESXi used.
|
|
|
|
|
2017-11-27 20:26:03 -05:00
|
|
|
- `folder` (string) - Target path where the template will be created.
|
2017-07-31 00:26:58 -04:00
|
|
|
|
2017-11-27 20:26:03 -05:00
|
|
|
- `insecure` (boolean) - If it's true skip verification of server certificate. Default is false
|