VSphere Post-processor failed

268 views
Skip to first unread message

Mic Le

unread,
Feb 10, 2016, 4:30:27 PM2/10/16
to Packer
Hi All,

I am trying to create a post-processor for uploading the VM image to vSphere server.

My template section looks like this:

```
"post-processors": [
    {
      "type": "vsphere",
      "username": "user",
      "password": "xxxxxxx",
      "vm_name": "template-vm",
      "datastore": "vm-store",
      "vm_network": "vm-lan",
      "disk_mode": "thin",
      "vm_folder": "vm-folder",
      "datacenter": "vm_dc",
      "host": "vsphere-host.net",
      "cluster": "vm-cluster"
    }
  ]
``` 

After running packer build command, I got this error

```
...
==> vmware-iso: Compacting the disk image
==> vmware-iso: Running post-processor: vsphere
    vmware-iso (vsphere): Uploading output-vmware-iso/packer-vmware-iso.vmx to vSphere
Build 'vmware-iso' errored: 1 error(s) occurred:

* Post-processor failed: Failed: exit status 1
Stdout: Opening VMX source: output-vmware-iso/packer-vmware-iso.vmx
Error: File (/var/folders/6k/35ncms113gj32qjptgpllgsrt8cpnk/T/packer012297839) could not be found.
Completed with errors


==> Some builds didn't complete successfully and had errors:
--> vmware-iso: 1 error(s) occurred:

* Post-processor failed: Failed: exit status 1
Stdout: Opening VMX source: output-vmware-iso/packer-vmware-iso.vmx
Error: File (/var/folders/6k/35ncms113gj32qjptgpllgsrt8cpnk/T/packer012297839) could not be found.
Completed with errors


==> Builds finished but no artifacts were created.
```

Can you point me to what can be the problem here?

P.S. I am running packer on OSX.

Thanks!

Andrew Langhorn

unread,
Feb 10, 2016, 4:40:29 PM2/10/16
to Packer
Hi,

Please can you post your entire Packer JSON? I'd like to get some context about where /var/folders... comes from.

Thanks,

Andrew

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6adafc20-51e9-413d-9f27-bd39f2739b91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Andrew Langhorn
Senior Infrastructure Engineer
Emailandrew....@thoughtworks.com
Telephone+44 7733 339809
ThoughtWorks

Mic Le

unread,
Feb 10, 2016, 4:45:27 PM2/10/16
to Packer
Looks like it is related to this issue : https://github.com/joefitzgerald/packer-windows/issues/27
Which is still open ..

Mic Le

unread,
Feb 10, 2016, 5:08:27 PM2/10/16
to Packer
Just figured that vsphere post-processor should be run after OVF post-processor (which creates the missing temp file)
 

On Wednesday, February 10, 2016 at 1:30:27 PM UTC-8, Mic Le wrote:
Reply all
Reply to author
Forward
0 new messages