I’m trying to finish up getting an ovf template for vSphere via Packer, and I’ve hit an error that I just have no idea how to troubleshoot.
The error from the logs:
==> vsphere-clone.linux_centos_7: Running post-processor: (type vsphere)
vsphere-clone.linux_centos_7 (vsphere): Uploading centos7/coco-linux-centos7-test-sweikatam-1422-202106.ovf to vSphere
vsphere-clone.linux_centos_7 (vsphere): Validating Username and Password with dry-run
vsphere-clone.linux_centos_7 (vsphere): Calling OVFtool to upload vm
vsphere-clone.linux_centos_7 (vsphere): Opening OVF source: centos7/coco-linux-centos7-test-sweikatam-1422-202106.ovf
vsphere-clone.linux_centos_7 (vsphere): The manifest validates
vsphere-clone.linux_centos_7 (vsphere): Opening VI target: vi://[MASKED]@<my_fqdn_vsphere_host>:443/<my_dc>/host/<my_cluster>
vsphere-clone.linux_centos_7 (vsphere): Deleting VM: coco-linux-centos7-test-sweikatam-1422-202106
vsphere-clone.linux_centos_7 (vsphere): Deploying to VI: vi://[MASKED]@<my_fqdn_vsphere_host>:443/<my_dc>/host/<my_cluster>
vsphere-clone.linux_centos_7 (vsphere): Transfer Completed
vsphere-clone.linux_centos_7 (vsphere): Completed successfully
Build 'vsphere-clone.linux_centos_7' errored after 10 minutes 27 seconds: 1 error(s) occurred:
* Error destroying builder artifact: reading body msgpack decode error [pos 1102]: reflect.Set: value of type map[interface {}]interface {} is not assignable to type error; bad artifact: []string(nil)
==> Wait completed after 10 minutes 27 seconds
==> Some builds didn't complete successfully and had errors:
--> vsphere-clone.linux_centos_7: 1 error(s) occurred:
* Error destroying builder artifact: reading body msgpack decode error [pos 1102]: reflect.Set: value of type map[interface {}]interface {} is not assignable to type error; bad artifact: []string(nil)
==> Builds finished but no artifacts were created.
And the post-processor code:
post-processors {
post-processor "vsphere" {
host = var.vsphere_server
username = var.vsphere_username
password = var.vsphere_password
insecure = true
cluster = var.vsphere_cluster
datacenter = var.vsphere_datacenter
datastore = var.vsphere_datastore
esxi_host = "<my_fqdn_esxi_host>"
vm_name = "${var.clone_name}-${local.timestamp}"
vm_folder = "${var.vsphere_folder}"
#vm_network = "${var.network}"
disk_mode = "thin"
overwrite = true
}
}
The ovf is actually created and loaded into vSphere, but I’m just not sure even where to go to find this problem out. The packer logs I generated don’t have much more of an insight, so if there’s a non-interactive debugging option, that would be great to know about (this runs in a gitlab CI/CD pipeline).
Anyone have any good tips as to where I can even start?