If you're willing to go the plugin route, the following post-processor will do what you need:
packer-post-processor-ovftool
It uses VMWare's command-line ovftool
to add the ability to Packer to convert .ovf
files (actually multiple files within a single folder) into a single .ova
file. Simply configure your packer template as such:
{
"post-processors": [{
"type": "ovftool",
"only": ["vmware"],
"format": "ova"
}]
}
If you don't like that route, apparently .ova
files are just tar files of the entire .ova
directory. You could use Packer's compress post-processor to compress the VMWare build output into a single tar archive and then just rename the file extension from .tar
to .ova
. You would configure that as follows:
{
"post-processors": [{
"type": "compress",
"only": ["vmware"],
"output": "actuallyAnOVA.tar"
}]
}