I think you got me wrong. I didnt explain it properly also. I am running a vmware-iso builder only, but this is being run from a Azure VM contacting a ESX machine.
Below is my code. My question is why image is getting exported to this azure VM. When I run the same code from a vmware VM it creates the image in ESX machine itself. Both cases I am not using 'format' option.
{
"variables": {
"vm_name": "packer",
"vm_description": "rhel7 base",
"iso": "/data/rhel-server-7.5-x86_64-dvd.iso",
"checksum": "d0dd6ae5e001fb050dafefdfd871e7e648b147fb2d35f0e106e0b34a0163e8f5",
"iso_checksum_type": "sha256",
"remote_password" : "{{env `ESX_SSH_PASS`}}",
"ssh_password": "{{env `VM_SSH_PASS`}}"
},
"builders": [
{
"type": "vmware-iso",
"ssh_username": "packer",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": 22,
"ssh_wait_timeout": "30m",
"http_directory": "./",
"vm_name": "{{ user `vm_name` }}",
"guest_os_type": "rhel7-64",
"iso_url": "{{ user `iso` }}",
"iso_checksum": "{{ user `checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"tools_upload_flavor": "linux",
"remote_datastore": "datastore_name",
"remote_host": "IP_ESX",
"remote_password": "{{ user `remote_password` }}",
"remote_type": "esx5",
"remote_username": "root",
"disk_size": "32000",
"headless": false,
"vnc_port_min": 5980,
"vnc_port_max": 5990,
"vmx_data": {
"memsize": 512,
"ethernet0.networkName": "network_name",
"ethernet0.present": "TRUE",
"ethernet0.startConnected": "TRUE",
"ethernet0.virtualDev": "e1000",
"ethernet0.addressType": "generated",
"ethernet0.generatedAddressOffset": "0",
"ethernet0.wakeOnPcktRcv": "FALSE",
"numvcpus": 1
},
"boot_wait": "10s",
"boot_command": [
"<esc><wait>",
"vmlinuz initrd=initrd.img net.ifnames=0 biosdevname=0 ",
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks4.cfg ip=IP netmask=maske_details gateway=gatwway_details<enter><wait>"
],
"shutdown_command": "echo '{{ user `username` }}' | sudo -S shutdown -P now"
}
]
}
Shyam