I've search but cant figure this out. When I run packer it wont create the VMX file but does not raise an exception.
An exception is raised a few steps latter when trying to start the VM. After packer completes I see a corrupt VM added to vCenter as 'unknown'. It can be removed but not edited in any manor.
Thanks for the help!
[root@util packer]# ./packer build ubuntu.vmware
vmware-iso output will be in this color.
==> vmware-iso: Downloading or copying ISO
vmware-iso: Downloading or copying:
http://repo/ubuntu-12.04.1-server-amd64.iso==> vmware-iso: Uploading ISO to remote machine...
==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting HTTP server on port 8367
==> vmware-iso: Registering remote VM...
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Error starting VM: 'vim-cmd vmsvc/power.on /vmfs/volumes/san/test/ubuntu-12.04-packer.vmx'
==> vmware-iso:
==> vmware-iso: Stdout:
==> vmware-iso:
==> vmware-iso: Stderr: (vim.fault.NotFound) {
==> vmware-iso: dynamicType = <unset>,
==> vmware-iso: faultCause = (vmodl.MethodFault) null,
==> vmware-iso: msg = "Unable to find a VM corresponding to "/vmfs/volumes/san/test/ubuntu-12.04-packer.vmx"",
==> vmware-iso: }
==> vmware-iso:
the json:
{
"builders": [{
"vm_name": "ubuntu-12.04-packer",
"output_directory": "test",
"type": "vmware-iso",
"guest_os_type": "ubuntu",
"http_directory": "http",
"iso_url": "
http://repo/ubuntu-12.04.1-server-amd64.iso",
"iso_checksum_type":"md5",
"iso_checksum":"a8c667e871f48f3a662f3fbf1c3ddb17",
"ssh_username": "nnnnnn",
"ssh_password": "aaaaa",
"ssh_wait_timeout": "10000s",
"remote_type":"esx5",
"remote_host":"n7vmw2524",
"remote_username":"root",
"remote_password":"aaaaaaa",
"remote_datastore":"san",
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz auto",
" console-setup/ask_detect=false",
" console-setup/layoutcode=us",
" console-setup/modelcode=pc105",
" debconf/frontend=noninteractive",
" debian-installer=en_US",
" fb=false",
" initrd=/install/initrd.gz",
" kbd-chooser/method=us",
" keyboard-configuration/layout=USA",
" keyboard-configuration/variant=USA",
" locale=en_US",
" netcfg/get_domain=vm",
" netcfg/get_hostname=vagrant",
" noapic" ,
" preseed/url=
http://repo/ubuntu.12.04.seed",
" -- ",
"<enter>"
],
"shutdown_command": "shutdown -h now",
"disk_size": 10140
}]
}