Packer virtualbox-vm export with different filename

289 Views Asked by At

I'm using Packer to export existing VirtualBox VM to ova, but could not find how to specify a filename for that ova.

Config looks like this:

  "builders": [{
  "type": "virtualbox-vm",
  "vm_name": "base-vm",
  "output_directory": "output-ova",
  "format": "ova",
  ...

In the output I got output-ova/base-vm.ova. Desired output is something like output-ova/exported-vm.ova.
Option vm-name controls both name of the existing VM and the name of the exported file.

So, how do I set a different name for the output file?

1

There are 1 best solutions below

4
On

did you try something with

  "builders": [{
      "type": "virtualbox-vm",
      "vm_name": "base-vm",
      "output_directory": "output-ova",
      "format": "ova",
      "export_opts":
      [
          "--output", "exported-vm.ova",
      ],
      ...