ESXi post processor abort trap

44 views
Skip to first unread message

Mike M

unread,
May 28, 2018, 11:06:20 AM5/28/18
to Packer
Hello,

Im looking to do what I consider a fairly vanilla task in packer but i'm getting a error message that is not very helpful.   

Basically what i'm trying to do is build a VM and upload it to ESXi.  Im vcenter 6.5 update 1 if that plays into it.  From ESXi it looks like it doesn't even try to upload.  It appears that the build goes through fine but when it gets to the post-processor I get:

==> vmware-iso: Downloading or copying ISO
    vmware-iso: Found already downloaded, initial checksum matched, no download needed: http://centos.s.uw.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1804.iso
==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting HTTP server on port 8895
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Waiting 10s for boot...
==> vmware-iso: Connecting to VM via VNC (127.0.0.1:5915)
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Waiting for SSH to become available...
==> vmware-iso: Connected to SSH!
==> vmware-iso: Executing local command: echo foo
    vmware-iso: foo
==> vmware-iso: Gracefully halting virtual machine...
    vmware-iso: Waiting for VMware to clean up after itself...
==> vmware-iso: Deleting unnecessary VMware files...
    vmware-iso: Deleting: output-vmware-iso/startMenu.plist
    vmware-iso: Deleting: output-vmware-iso/test_vm.plist
    vmware-iso: Deleting: output-vmware-iso/vmware.log
==> vmware-iso: Compacting the disk image
==> vmware-iso: Cleaning VMX prior to finishing up...
    vmware-iso: Unmounting floppy from VMX...
    vmware-iso: Detaching ISO from CD-ROM device...
    vmware-iso: Disabling VNC server...
==> vmware-iso: Skipping export of virtual machine (export is allowed only for ESXi and the format needs to be specified)...
==> vmware-iso: Running post-processor: vsphere
    vmware-iso (vsphere): Uploading output-vmware-iso/test_vm.vmx to vSphere
Build 'vmware-iso' errored: 1 error(s) occurred:

* Post-processor failed: Failed: signal: abort trap


Here is my config

Enter code here...

{

"builders": [
{
"type": "vmware-iso",
"iso_url": "http://centos.s.uw.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1804.iso",
"iso_checksum": "714acc0aefb32b7d51b515e25546835e55a90da9fb00417fbee2d03a62801efd",
"iso_checksum_type": "sha256",
"ssh_username": "packer",
"ssh_password": "packer",
"ssh_wait_timeout":"60000s",
"vmx_data": {
"memsize": "4096",
"numvpus": "4",
"disk_size": "50000"
},
"shutdown_command": "sudo shutdown -P now",
"http_directory": "http",
"vm_name": "test_vm",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
]

}
],

"provisioners": [
{
"type": "shell-local",
"command": "echo foo"
}
],

"post-processors": [
{
"type": "vsphere",
"insecure": true,
"cluster": "Cluster",
"datacenter": "Cluster",
"datastore": "Synology",
"host": "10.75.1.210",
"username": "admin",
"password": "xxxxxxx",
"vm_name": "test_packer",
"vm_network": "network"
}
]
}

Rickard von Essen

unread,
May 28, 2018, 3:20:51 PM5/28/18
to packe...@googlegroups.com
Rerun with PACKER_LOG=1 packer build ... and supply the output.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/f477d35e-992f-4146-a391-31cd5ac9815d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike M

unread,
May 28, 2018, 5:59:19 PM5/28/18
to Packer
Attached is the log file.  Thanks for the help!
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
packer_log2.txt

Mike M

unread,
May 28, 2018, 8:19:51 PM5/28/18
to Packer
Looks like I got it figured out.  I wasnt aware that ovftool was more than one binary.  Its not ok to just copy the binary to /usr/local/bin on a mac.  There are is a lib directory etc to be concerned with.  I ended up putting the /Applications/VMware\ OVF\ Tool in the path.  Removing the spaces to make it easier.  Live and learn :)


Thanks 

Gabo Kete

unread,
May 28, 2018, 8:28:04 PM5/28/18
to Packer
Starting ovftool with parameters: --acceptAllEulas --name=test_packer --datastore=Synology --noSSLVerify=true --diskMode=thick --network=network output-vmware-iso/test_vm.vmx vi://packer:<password>@10.75.1.210/Cluster/host/Cluster

This is where is failing, try running this manually and see how it goes.. I reckon there is something wrong when packer tries to use ovftool...

Gabo Kete

unread,
May 28, 2018, 9:02:27 PM5/28/18
to Packer
Ohhh just saw your reply... all good.. glad you figured it out.. 
Reply all
Reply to author
Forward
0 new messages