2
votes

I am using virtualbox-iso and vmware-iso builders. I am on Mac, so vmware-iso runs with vmware fusion.

Virtualbox-iso out is a single .ova file.

But the vmware-iso output is actually a bunch of files. Also could not figure out a way to import them.

How do I make packer export the vmware-iso output into a single importable output file?

2

2 Answers

1
votes

https://github.com/mitchellh/packer/issues/1593

Apparently packer exports only .vmx format for vmware.

1
votes

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"
    }]
}