Virt-manager not finding OVMF UEFI firmware

So I’ve been following the official guide for passing through GPUs to QEMU VMs and so far everything seems to be going well except for the fact that I can’t make the VM EFI based. When I configure the VM I can’t change the firmware to UEFI. virt-manager tells me “No UEFI firmware found”

I have the OVMF files installed and my qemu.conf has the following added to the bottom of the file.

nvram = [

“/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd”

]

Not entirely sure why I’m having this issue as all of the other guides I’ve read didn’t mention this issue.

Also I rebooted my PC a few times and not virt-manager isn’t asking for root password when I start it and isn’t connecting to QEMU/KVM.

Any recommendations?

You can try to run libvirt in debugging mode and see if it spits out some more info. Maybe just journalctl at first. Or you edit the xml of the VM manually and add the options for uefi and the paths for the binaries.
Also depends on the distro and version sometimes where the files are installed and sometimes also on permissions and selinux thingies.

If using ArchLinux, there is an unresolved issue at https://bugs.archlinux.org/task/64175

As a temporary workaround you can downgrade libvirt e.g.

# if package is not in cache take a look to https://wiki.archlinux.org/index.php/downgrading_packages#Arch_Linux_Archive
cd /var/cache/pacman/pkg
sudo pacman -U libvirt-5.9.0-1-x86_64.pkg.tar.xz

If virt-manager won’t connect after changing qemu.conf then I’m assuming something is wrong there.

There should be already be a commented out parameter for nvram in qemu.conf.

I have figured out the proper way to not just add the OVMF but also to add a second custom one. However you must still manually copy over the _VARS.fd file to the nvram folder that matches the name of the VM (if you are making a new VM) because virt-manager will not create the file automatically any more. Also it looks like they will not fix it as virt-manager will be going away…
See the attached folder where I include the .json files and also a script to copy everything where it needs to go.
Note that I have the windows 7 fixed OVMF from here included: https://github.com/tholin/OVMF-win7-hyperv
install_OVMF_JSON.zip (826.4 KB)