-1

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?

kotofos
  • 39
  • 1
  • 4

1 Answers1

1

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",
      ],
      ...
Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • Where this information came from? Official docs say: --output/-o: Specifies the short name of the cloud service provider to which you export. For Oracle Cloud Infrastructure, enter OCI://. – kotofos May 18 '20 at 04:30
  • comes from trial :) I've been using VBoxManage tool for some times before – Frederic Henri May 18 '20 at 07:06
  • Actually that --output works, but in case of packer, it is not. Syntax error: You can only specify --output once. Looks like packer itself uses it. – kotofos May 18 '20 at 07:18
  • then packer must define the output value itself and not sure we can re-use, I think it will be an issue against packer directly – Frederic Henri May 18 '20 at 07:34