Skip to content

Conversation

@alexhaydock
Copy link

Description

This is a draft PR to add support for using EFI firmware in qcow2 format.

Merging this PR allows the plugin to keep up with the modern approach taken by distributions like Fedora which have retired raw versions of the 4M firmware images in their edk2 package in favour of only shipping qcow2 versions.

This approach is unlikely to be reverted. I asked one of the maintainers about this and was told:

The advantage of using qcow2 is that you save memory with sparse flash images. That is important on arm, where the flash has a fixed size of 2x 64M and only a small fraction is actually used. x64 has been switched over too for consistency.

So since it does not appear that this approach will go away, and other distros will likely follow suit, it makes sense for the plugin to update to handle this situation.

I have tested this and it works on a Fedora host using the edk2 package and these EFI variables passed to a Packer QEMU source:

efi_firmware_code         = "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2"
efi_firmware_vars         = "/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2"

I think what I'm mostly missing here is updating tests to account for this new acceptable scenario of qcow2 firmware, and also updating documentation.

This is a draft PR as I'm not super familiar with the codebase so feedback is very welcome on what might be needed to merge it!

Resolved Issues

Rollback Plan

Unknown. Please advise.

This is a minimal change but I assume as it's quite a clean single PR it could easily be reverted if necessary.

Changes to Security Controls

None.

@alexhaydock alexhaydock requested a review from a team as a code owner October 13, 2025 17:36
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Oct 13, 2025

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin does not support EFI firmware in qcow2 format

1 participant