hashicorp / hashicorp/packer-plugin-virtualbox
Exported EFI VM's do not include relevant NVRAM files
- Dominant language
- Go
- Stars
- 29
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
#### Overview of the Issue
Sometimes when running EFI VM's NVRAM files can be created, at the moment these get cleaned up when the VM is deleted after Packer has exported it, however these may be necessary for the VM to boot as the resulting OVF file will reference them:
```xml
```
Unfortunately Virtualbox doesn't offer a way to change the NVRAM location at export time natively, perhaps it could be achieved with an API call?
In my production environment I am using CI/CD to copy the NVRAM file to the Packer output directory and then edit the XML of the resulting OVF file to change the location of the NVRAM file, though it's my belief Packer should handle this natively.
At the moment this only seems to affect macOS, but I should imagine as more things make use of NVRAM files this will be more of an issue.
#### Reproduction Steps
Build an image that uses EFI firmware and stores NVRAM output (at the moment this appears to be just macOS)
Import the OVF file
It will be un-bootable until you update the location of the NVRAM file
### Plugin and Packer version
```
❯ packer version
Packer v1.7.8
```
### Simplified Packer Buildfile
https://gist.github.com/shoddyguard/01f726a357d87fa873eb0f92d7b6ee47
### Operating system and Environment details
macOS 12.1 host OS and macOS 11/12 VM
### Log Fragments and crash.log files
N/A
Contributor guide
Assessment
This issue has not been assessed yet.