Hi here,
I’m running a simple packer hcl file with the virtualbox-ovf builder.
I’m expecting to get an ova file at the end of the build execution, while the output_directory removes at the end of the build execution and I’m not getting any ova files (seems like packer isn’t export it).
Another problem: packer removes the VM at the end of the build execution even though keep_registered = true
Why it’s happening and how can I solve it?
My packer file:
# https://www.packer.io/docs/builders/virtualbox/ovf
source "virtualbox-ovf" "autogenerated_1" {
communicator = "winrm"
shutdown_command = "C:\\Windows\\Systems32\\shutdown.exe /s /t 0 /f"
source_path = "win19-base.ova"
winrm_host = "packer"
winrm_username = "XXXXXXXXXXXX"
winrm_password = "XXXXXXXX"
ssh_skip_nat_mapping = true
winrm_insecure = true
winrm_use_ssl = true
winrm_port = 5986
vboxmanage = [["modifyvm", "{{ .Name }}", "--memory", "8192"], ["modifyvm", "{{ .Name }}", "--cpus", "12"], ["modifyvm", "{{ .Name }}", "--vram", "32"],["modifyvm", "{{ .Name }}", "--nic1", "bridged"]]
vm_name = "packer_output_template"
output_directory = "./builds/"
keep_registered = true
}
build {
sources = ["source.virtualbox-ovf.autogenerated_1"]
}