Possible to install OVMF/UEFI firmware for QEMU/KVM


Planning on trying out some virtualization on my Void Linux machine, installed libvirt, qemu/kvm and virt-manager, all seems to work nicely.

Unfortunately I need OVMF/UEFI firmware installed so QEMU can boot UEFI operating systems for a project. It’s easy enough to do with Arch and other distros but I looked and no similar OVMF firmware package seems to currently exist for Void.

Anyone else have any experience with this?


["SOLVED"] Black screen. Can't boot with Xen & Syslinux
(Masato the Empty) #2

You can always download the UDK and build your own (Void does have the necessary tools as far as I can tell). It’s a project I’ve considered but haven’t felt like tackling.

I usually just extract the firmware from others’ builds. Currently using 20160418gita8c39ba from FC24. A bit old now, but works fine for me. I’m used to going elsewhere since back when I was using Jessie, the build they had just didn’t work well enough for me.

If you like newer builds (or like to update them regularly) they do regular builds (nightlies?) at kraxel.org in the jenkins/edk2 repo.


All sorted with the edk2 nighties.

One problem I have is the lack of persistence of the OVMF settings (screen resolution, etc.). In Proxmox (which my main server runs) they solve it by creating a 128K disk image known as “EFI Disk”, but I haven’t figured out how to do the same with libvirt yet.

EDIT: Think I sorted it out, make sure the CODE and VAR files match.

nvram = [
    "/usr/share/OVMF/OVMF_CODE-with-csm.fd:/usr/share/OVMF/OVMF_VARS-with-csm.fd" ]


I figured out how to build edk2 and OVMF in Void. It’s currently not trivial to automate in a srcpkg but I’m sure it could be done with some work.

(Masato the Empty) #5

If I recall, there are multiple stages to the build (at least 2) to get actual EFI binaries, right?

I messed around just a little bit, but couldn’t decide if I wanted to

  • figure out how to package the UDK itself: not so simple/neat since it looks like you build everything within the tree, but with the chance that the UDK itself would be useful in itself as a development tool made that worth considering.
  • download the UDK, build the binaries and discard everything but the final product of interest (with the possibility of making any number of subpackages to include other useful products of the build)

By the time UDK 2017 was released (originally slated for early Q1 2017… HA!) I no longer had the time I’d posessed when I started using Void, so I didn’t bother seeking out opinions/advice. (though I presently think #2 is the best option; the UDK really seems like one of those projects that if you’re going to actually use to develop other software, you’d do it standalone in your home directory or a git fork, like you would a project inside an IDE).

Quite interesting to me that here we are quite some time later, and you’re actually the first person I’ve seen here who has expressed an interest in having OVMF binaries built in Void. (well OVMF has been mentioned on occasion, but I’m pretty sure you’re the first person I’ve seen to mention downloading and actually testing the build process).

I like your willingness to try. It’s refreshing.

And I suspect that at least a few people would be happy to see OVMF binaries provided in Void,


That’s true. You first need to build EDK2 then OVMF.

I think 2. is the best approach here dependency wise, given how Void is a binary based distro, although xbps-src is nicely documented.


Very true. It’s for a project of doing some driver debugging of OS X (aka macOS) where I have a Macbook Pro with physical hardware I need to reverse engineer. A OS X VM on my desktop is running the debugger host with my Macbook on the same LAN as the target.

Offtopic but I spent 6 years going blind before I was treated. Now I almost have time for everything :smiley:

Me too

Be well