I have a Fedora Anaconda kickstart and installer that is fully headless and includes packages in the ISO itself at build-time (eg, not an actual network install) - it shuts down immediately after completion via kickstart command.
My current process for producing an OVA from these installers is to install the ISO into a new VM manually with the ISO attached, let the installer complete naturally, and then export the resulting VM to an OVA after.
vmware-iso seems like a good way to automate this process and save some time.
{
"builders": [{
"type": "vmware-iso",
"iso_url": "https://git.company.com/production-images/raw/tagged-installer-2020-02-04.iso",
"iso_checksum": "8812f6758aae125346a0ee8b9f42829c4299e869c61d710442a4ca97074e1b3c",
"ssh_username": "root"
}]
}
Is there any way to skip the SSH commands here and just export the VM as-is after we detect that it is shut down?
Warnings for build 'vmware-iso':
* A shutdown_command was not specified. Without a shutdown command, Packer
will forcibly halt the virtual machine, which may result in data loss.
==> vmware-iso: Retrieving ISO
==> vmware-iso: Trying https://git.company.com/production-images/raw/tagged-installer-2020-02-04.iso
==> vmware-iso: Trying https://git.company.com/production-images/raw/tagged-installer-2020-02-04.iso?checksum=8812f6758aae4945f6a0ee8b9f42829c4299e869c61d710442a4ca97074e1b3c
==> vmware-iso: https://git.company.com/production-images/raw/tagged-installer-2020-02-04.iso?checksum=8812f6758aae4945f6a0ee8b9f42829c4299e869c61d710442a4ca97074e1b3c => /Users/myuser/Development/packer/packer_cache/f1c0a03
0d1009448f114328ec7418173f8121141.iso
==> vmware-iso: Creating required virtual machine disks
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Waiting 10s for boot...
==> vmware-iso: Connecting to VM via VNC (127.0.0.1:5914)
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Waiting for SSH to become available...
==> vmware-iso: Timeout waiting for SSH.
==> vmware-iso: Stopping virtual machine...
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Timeout waiting for SSH.