I am new to Packer and have been attempting to use the Packer vmware-iso builder. I have attempted to build both an Ubuntu 18.04 and a CentOS 7 template. Both are failing at the same point. I am unsure what I'm missing. I'm not even sure where to begin troubleshooting. When I run packer build it proceeds through the following steps:
- Retrieving ISO
- Leaving retrieve loop for ISO
- Creating floppy disk... (I am using a floppy disk for the .cfg file because I'm building directly on the esx host)
- Uploading Floppy to remote machine...
- Uploading ISO to remote machine...
- Creating required virtual machine disks
- Building and writing VMX file
- Build 'ubuntu-1604' errored: unexpected EOF
- Some builds didn't complete successfully and had errors:
- ubuntu-1604: unexpected EOF
- Builds finished but no artifacts were created
This doesn't seem accurate as artifacts are present on the ESX host: packer_cache folder with ISO virtual machine folder with a vmdk file, but no vmx files are present.
Here is some of the log output:
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 Writing VMX to: /tmp/vmw-iso942565597/ubuntu-1804-base.vmx
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 Cleaning up remote path: /vmfs/volumes/datastore1/packer_cache/packer670624036
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 Removing remote cache path /vmfs/volumes/datastore1/packer_cache/packer670624036 (local /vmfs/volumes/datastore1/packer_cache/packer670624036)
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 [DEBUG] Opening new ssh session
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 [DEBUG] starting remote command: rm -f "/vmfs/volumes/datastore1/packer_cache/packer670624036"
- 2019/04/19 12:03:30 packer: 2019/04/19 12:03:30 Deleting floppy disk: /tmp/packer670624036
- 2019/04/19 12:03:30 packer: panic: runtime error: invalid memory address or nil pointer dereference
- 2019/04/19 12:03:30 packer: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1df735c]