Packer post-processor to register vmware tools, allowing for guest customization of the output from the vsphere and vsphere-template post-processors during deployment. Otherwise customspec fails because VMware thinks guest tools are not installed.
These instructions will provide steps to build and use this post-processor in your vsphere packer builds.
- Go - 1.12.4 tested
- Packer - 1.4.0 tested
- VMware Player/Workstation - 14.1.7 tested
- VMware VIX SDK - 1.15.0 tested
- VMware vCenter and accompanying infra - ESXi 6.0-6.5 tested
git clone https://github.com/cacoyle/packer-vsphere-vm-tools.git; cd packer-vsphere-vm-tools
go get -d ./...
go build .
cp packer-vsphere-vm-tools ~/.packer.d/plugins/packer-post-processor-vsphere-vm-tools
{
"variables": {
"vcenter_url": "vcenter.local",
"vcenter_username": "Administrator",
"vcenter_password": "XXXXXXX"
},
"builders": [
{
"type": "vmware-iso",
....
}
],
"post-processors": [
[
{
"type": "vsphere",
....
},
{
"type": "vsphere-vm-tools",
"host": "{{ user `vcenter_url` }}",
"insecure": true,
"username": "{{ user `vcenter_username` }}",
"password": "{{ user `vcenter_password` }}",
"keep_input_artifact": true
},
{
"type": "vsphere-template",
....
}
]
]
}
- Make retry interval and max attempts part of configuration
- Fork/PR this feature to the packer/vsphere-template for review