Packer build using vmware-iso\ESX, post processor to vagrant\virtualbox possible?

Hi

I’m new to Packer and currently using vmware-iso and esx to build my images.

For local testing i now want to use a post-processor to output a .box file that will work with virtualbox and vagrant. is this possible? is there any examples i can reference?

I added “provider”: “virtualbox” to my post-processor but this throws an error :frowning:

Thanks
Stephen

Use the “virtualbox-iso” builder.

“builders”: [
{
“type”: “virtualbox-iso”,
“vboxmanage”: [
[ “modifyvm”, “{{.Name}}”, “–memory”, “{{ user memory }}” ],
[ “modifyvm”, “{{.Name}}”, “–vram”, “48” ],
[ “modifyvm”, “{{.Name}}”, “–cpus”, “{{ user cpus }}” ]
],
“boot_wait”: “{{ user boot_wait }}”,
“communicator”: “winrm”,
“format”: “{{ user virtualbox_format }}”,
“guest_os_type”: “Windows2016_64”,
“headless”: “{{ user headless }}”,
“http_directory”: “{{ user http_directory }}”,
“iso_checksum”: “{{ user iso_checksum }}”,
“iso_checksum_type”: “{{ user iso_checksum_type }}”,
“iso_url”: “{{ user iso_base }}/{{ user iso_path }}”,
“shutdown_command”: “{{ user shutdown_command }}”,
“virtualbox_version_file”: “.vbox_version”,
“vm_name”: “{{ user template }}”,
“winrm_password”: “vagrant”,
“winrm_timeout”: “12h”,
“winrm_username”: “vagrant”,
“floppy_files”: [ “answer_files/{{ user vbox_answer_files }}/Autounattend.xml”,
“scripts/winrm.ps1”,
“scripts/install-chef.ps1”
]
},

and something like

"output": "{{ user `output_dir` }}/{{ user `long_name` }}.{{.Provider}}.box",
  "vagrantfile_template": "{{ user `windows_vagrantfile`}}",
  "type": "vagrant"
},
{
  "type": "manifest",
  "output": "{{ user `output_dir` }}/{{ user `long_name` }}.manifest.json",
  "strip_path": true
},