Hello, I'm trying to use the vsphere post-processor to upload the artifacts produced from the vmware-iso builder to my vSphere private cloud environment in OVH. I've run into a couple different issues though, all of which are occurring once the post-processor phase starts.
To make sure I'm using the correct vsphere info in the post processor config, could someone verify what the docs mean when they say the vsphere-host? From my understanding that would be the IP address of the host machine (ESXi) that lives in my vSphere datacenter cluster. So the value I would need to put here would be just an IP address (not sure if a port needs to be exposed). Am I wrong in this assumption? Does this actually need to be the IP or the domain name of my vCenter server instance that I access through the web portal (i,e
https://pcc-22-333-111-106.ovh.com)?
I'm also unsure of some of the other fields in the post-processor config since there appears to be multiple names for everything in vSphere. for example my data center appears to have two separate names depending on where I'm viewing it. If it's from the vSphere web portal then it will say pcc-22-333-111-106_datacenter3101 yet in other areas it will just be labeled datacenter3101.
I've tried a number of different configuration but nothing seems to be working. I've also attempted to manually upload the vmx directly using the OVFTool and that also fails. Below is some additional info. Thanks for any help!
packer-config.json (using vCenter domain as host)
packer-config.json (using ESXi host ip from vSphere datacenter)
Here are some of the different Errors I've seen produced
Segmentation Fault Error log
==> vmware-iso: Skipping export of virtual machine (export is allowed only for ESXi)...
2019/01/24 14:36:33 packer: 2019/01/24 14:36:33 Writing VMX to: ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx
2019/01/24 14:36:33 packer: 2019/01/24 14:36:33 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion list
2019/01/24 14:36:33 packer: 2019/01/24 14:36:33 stdout: Total running VMs: 0
2019/01/24 14:36:33 packer: 2019/01/24 14:36:33 stderr:
2019/01/24 14:36:33 [INFO] (telemetry) ending vmware-iso
2019/01/24 14:36:33 [INFO] (telemetry) Starting post-processor vsphere
==> vmware-iso: Running post-processor: vsphere
2019/01/24 14:36:33 packer: 2019/01/24 14:36:33 Starting ovftool with parameters: --acceptAllEulas --name=vmware-iso --datastore=pcc-005044 --noSSLVerify=true --diskMode=thick ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx vi://sstratis%40localos:<password>@pcc-37-187-228-106.ovh.com/datacenter3101/host/Cluster1
vmware-iso (vsphere): Uploading ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx to vSphere
2019/01/24 14:36:36 [INFO] (telemetry) ending vsphere
2019/01/24 14:36:36 Deleting original artifact for build 'vmware-iso'
2019/01/24 14:36:36 ui error: Build 'vmware-iso' errored: 1 error(s) occurred:
* Post-processor failed: Error uploading virtual machine: signal: segmentation fault
2019/01/24 14:36:36 Waiting on builds to complete...
2019/01/24 14:36:36 Builds completed. Waiting on interrupt barrier...
2019/01/24 14:36:36 machine readable: error-count []string{"1"}
2019/01/24 14:36:36 ui error:
==> Some builds didn't complete successfully and had errors:
2019/01/24 14:36:36 machine readable: vmware-iso,error []string{"1 error(s) occurred:\n\n* Post-processor failed: Error uploading virtual machine: signal: segmentation fault\n\n"}
2019/01/24 14:36:36 ui error: --> vmware-iso: 1 error(s) occurred:
Build 'vmware-iso' errored: 1 error(s) occurred:
Error with little to no explanation of what happened
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 Deleting key for ethernet device: ethernet0.virtualdev
==> vmware-iso: Skipping export of virtual machine (export is allowed only for ESXi)...
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 Deleting key for ethernet device: ethernet0.pcislotnumber
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 Writing VMX to: ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion list
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 stdout: Total running VMs: 0
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 stderr:
2019/01/24 16:10:12 [INFO] (telemetry) ending vmware-iso
==> vmware-iso: Running post-processor: vsphere
2019/01/24 16:10:12 [INFO] (telemetry) Starting post-processor vsphere
2019/01/24 16:10:12 packer: 2019/01/24 16:10:12 Starting ovftool with parameters: --acceptAllEulas --name=vmware-iso --datastore=pcc-005044 --noSSLVerify=true --diskMode=thick ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx vi://sstratis:<password>@https://pcc-37-187-228-106.ovh.com/pcc-37-187-228-106_datacenter3101/host/Cluster1
vmware-iso (vsphere): Uploading ../vmware/builds/packer-ubuntu-18.04-amd64-vmware/ubuntu-18.04-amd64.vmx to vSphere
2019/01/24 16:10:19 [INFO] (telemetry) ending vsphere
2019/01/24 16:10:19 Deleting original artifact for build 'vmware-iso'
2019/01/24 16:10:19 ui error: Build 'vmware-iso' errored: 1 error(s) occurred:
Build 'vmware-iso' errored: 1 error(s) occurred:
* Post-processor failed: Error uploading virtual machine: exit status 1
2019/01/24 16:10:19 Waiting on builds to complete...
2019/01/24 16:10:19 Builds completed. Waiting on interrupt barrier...
2019/01/24 16:10:19 machine readable: error-count []string{"1"}
2019/01/24 16:10:19 ui error:
==> Some builds didn't complete successfully and had errors:
2019/01/24 16:10:19 machine readable: vmware-iso,error []string{"1 error(s) occurred:\n\n* Post-processor failed: Error uploading virtual machine: exit status 1\n\n"}
2019/01/24 16:10:19 ui error: --> vmware-iso: 1 error(s) occurred:
* Post-processor failed: Error uploading virtual machine: exit status 1
==> Builds finished but no artifacts were created.
2019/01/24 16:10:19 [INFO] (telemetry) Finalizing.
* Post-processor failed: Error uploading virtual machine: exit status 1
==> Some builds didn't complete successfully and had errors:
--> vmware-iso: 1 error(s) occurred:
* Post-processor failed: Error uploading virtual machine: exit status 1