If you use Arch Linux and OVMF, you may have noticed that a recent update broke compatibility with your passthrough VM(s.) Luckily, we’re here to explain why this happened, and (hopefully) how to fix it.
While many guides online haven’t been tweaked yet to represent the change, this update presents a serious problem. The default OVMF path was changed, as well as the default filenames. At the time of writing, the Arch Wiki recommends that users edit their qemu configuration files in this way:
This will now result in an error message informing users that the file isn’t in the specified directory. It affects virtual machines running any operating system, not just windows. While this change breaks older Arch Linux guides, it hasn’t broken the actual functionality of OVMF. The change affects virtual machines already created, too, because the old location is no longer valid. The new directory structure and filenames are as follows:
[user@archlocal]: /usr/share/ovmf/x64>$ ls OVMF_CODE.fd OVMF_VARS.fd
Correcting the OVMF Problem
The fix is pretty straightforward, even for existing (and broken) VMs. Two simple steps is all it takes to get your virtual machine up and running again. First, edit the qemu configuration file like this:
After this edit, any new virtual machines that you create won’t need the following fix. To get back to a bootable state on your existing VMs, though, you have to edit your virtual machine’s XML file as shown below:
sudo EDITOR=nano virsh edit win10
(Before)
(After)
all that is left is to restart libvirt using:
sudo systemctl restart libvirtd
This change, while badly documented, doesn’t take more than 2 minutes. These changed defaults may come to other distros in the future, so keep an eye out for any OVMF package upgrades.
Discuss this issue and join the conversation about VFIO in our Discord server, and join our Steam Group to play your games with other VFIO enthusiasts!.