I have this code that when I run the packer command on my .json, the VM will boot up but will go into the UEFI interactive shell.
Sample code is below:
{
"variables": {
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Other_64",
"http_directory": "http",
"iso_url": "--the location of my .iso file",
"iso_checksum_type": "md5",
"iso_checksum": "the .iso's checksum",
"vm_name": "test_VM",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--firmware", "efi"],
["modifyvm", "{{.Name}}", "--ioapic", "on"],
["modifyvm", "{{.Name}}", "--rtcuseutc", "on"],
["modifyvm", "{{.Name}}", "--memory", "4096"],
["modifyvm", "{{.Name}}", "--mouse", "usbtablet"],
["modifyvm", "{{.Name}}", "--vram", "10"],
["modifyvm", "{{.Name}}", "--cpus", "2"],
["hostonlyif", "ipconfig", "vboxnet0", "--ip", "172.17.42.108"],
["modifyvm", "{{.Name}}", "--hostonlyadapter1", "vboxnet0"],
["modifyvm", "{{.Name}}", "--nic1", "hostonly"],
["modifyvm", "{{.Name}}", "--nictype1", "82540EM"],
["modifyvm", "{{.Name}}", "--cableconnected1", "on"],
["storagectl", "{{.Name}}", "--name", "SATA Controller", "--add", "sata"],
["createmedium", "disk", "--filename", "{{.Name}}.vdi", "--size", "512000", "--format", "VDI"],
["storageattach", "{{.Name}}", "--storagectl", "SATA Controller", "--medium", "{{.Name}}.vdi", "--port", "1", "--type", "hdd"],
["modifyvm", "{{.Name}}", "--boot1", "dvd", "--boot2", "disk", "--boot3", "none", "--boot4", "none"],
["showvminfo", "{{.Name}}"]
],
"headless": false,
"ssh_username": "root",
"ssh_password": "root",
"ssh_wait_timeout": "10000s",
"boot_wait": "5s",
"boot_command": [
"<wait60>",
"<enter>",
"<wait2>",
"<enter>",
"<wait2>",
"<tab>",
"<wait2>",
"<enter>",
"<wait2>",
"<tab>",
"<enter>",
"<wait2>",
"<enter>",
"<wait400>",
"<insert>",
"<wait400>",
"<insert>",
"<enter>"
],
"shutdown_command": ""
}]
}