Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported EFI VM's do not include relevant NVRAM files #54

Open
shoddyguard opened this issue Dec 16, 2021 · 0 comments
Open

Exported EFI VM's do not include relevant NVRAM files #54

shoddyguard opened this issue Dec 16, 2021 · 0 comments
Labels

Comments

@shoddyguard
Copy link

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:

<BIOS>
        <IOAPIC enabled="true"/>
        <NVRAM path="/Users/steve.brown/Documents/Repos/Personal/os-provisioning/.build/output/macOS_11/vbox/macOS11-base/macOS11-base.nvram"/>
        <SmbiosUuidLittleEndian enabled="true"/>
 </BIOS>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant