You are not logged in.

#1 2017-12-07 11:47:10

dominicm
Member
Registered: 2015-01-03
Posts: 92

[SOLVED] Libvirt fails to detect OVMF/UEFI firmware

I have just reinstalled arch from scratch but for the life of me cannot get OVMF UEFI to work. I used the exact steps I had used in previous install.

I am getting a warning icon next to BIOS section menu in virt-manager with the following displayed when hovered over: "Libvirt did not detect any UEFI/OVMF firmware images installed on host"


/etc/libvirt/qemu.conf

nvram = [
    "/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd",
    "/usr/share/ovmf/x64/ovmf_x64.bin:/usr/share/ovmf/x64/ovmf_vars_x64.bin",
    "/usr/share/ovmf/x64/ovmf_x64.bin:/var/lib/libvirt/images/ovmf_vars_x64.bin"
]

None of these entries are detected and make no noticeable difference.

I tried it with both ovmf-git and ed2k-git AUR packages. Applied 777 permissions and root:kvm ownership on the files and containing dir. Rebooted many times.

I need ovmf for GPU passthrough so bios is not an option. I am at a complete loss as to how to proceed. The only path I see is to dump arch and install fedora which has ovmf in official repo as a dependency of qemu.

Last edited by dominicm (2017-12-08 09:51:48)

Offline

#2 2017-12-07 11:51:35

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

Arch also has it in the repos: https://www.archlinux.org/packages/extra/any/ovmf/

You should probably read this:
https://wiki.archlinux.org/index.php/PC … d_guest_VM

Also,

dominicm wrote:

Applied 777 permissions and root:kvm ownership on the files and containing dir.

Why the heck would you do that?

Last edited by Omar007 (2017-12-07 11:53:18)

Offline

#3 2017-12-07 12:08:22

dominicm
Member
Registered: 2015-01-03
Posts: 92

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

777 permissions are purely for troubleshooting obviously...

I read that and as you can see from my original post its exactly what I did. Like I said it worked previously so something broke or changed in the mean time. There is nothing in the wiki relating to troubleshooting OVMF not getting detected.

Will try ovmf from the official repo but I don't think it will solve this as the ovmf-git worked previosuly and has worked perfectly until reinstall.

Offline

#4 2017-12-07 13:20:12

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

In your first post I see nothing representing the configuration as presented on the Wiki. All the paths you have mentioned there do not match the paths for the repo package.
See the Wiki or the files list of the ovmf package for the correct file paths.

I do not know the proper config for the custom AUR packages (e.g. ovmf-git), so if you could provide the output of `pacman -Ql ovmf-git`, I could check your paths.

If you've already made a VM and it is currently pointing to an OVMF path that doesn't exist (anymore), you'll need to use `virsh edit [vmname]` and correct the path.

Last edited by Omar007 (2017-12-07 13:24:53)

Offline

#5 2017-12-07 13:29:24

dominicm
Member
Registered: 2015-01-03
Posts: 92

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

Omar007 wrote:

In your first post I see nothing representing the configuration as presented on the Wiki. All the paths you have mentioned there do not match the actual path.
See the Wiki or the files list of the ovmf package for the correct file paths.

If you've already made a VM and it is currently pointing to an OVMF path that doesn't exist (anymore), you'll need to use `virsh edit [vmname]` and correct the path.

The paths do not matter as long as they exist and they do. I added several nvram entries during troubleshooting, none are detected.

Non-ovmf VMs do work btw. I don't have config from previous installation, which is on a physical disk. Like I said the setup steps were identical so the path was the same not that it matters since I am starting from scratch and not using any previous config files. I am trying to create a new VM but can't get past the last step where BIOS is selected (OVMF not detected warning).

Last edited by dominicm (2017-12-07 13:30:48)

Offline

#6 2017-12-07 15:14:40

dominicm
Member
Registered: 2015-01-03
Posts: 92

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

I have just removed other 2 ovmf AUR packages and installed official ovmf package. Copy and pasted nvram path from the Wiki, verified the files exist and restarted libvirtd. Exact same issue appeared when attempting to create a new VM. Rebooting the system did not help either. At this point my setup is exactly as described in the Wiki but it simply refuses to recognize an existing file.

Offline

#7 2017-12-07 17:51:52

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

EDIT: Actually, before all that, are you trying to create the VM in qemu:///system or in qemu:///session?
I have been assuming qemu:///system so far but as it stands I'm now seriously doubting this, in which case you're editing the wrong config file (iirc that would be ~/.config/libvirt/qemu.conf).
For passthrough you should be using qemu:///system though.

Ok in that case could you post the full qemu.conf file and libvirtd log (e.g. `journalctl -u libvirtd`)?

Last edited by Omar007 (2017-12-07 18:01:42)

Offline

#8 2017-12-07 18:21:14

dominicm
Member
Registered: 2015-01-03
Posts: 92

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

I think you are on the right track here. In virt-manager I see 2 tabs/categories LXC (was not there in previous install) and QUEMU/KVM User session. This would explain why I only see VMs created by non-root user.

I was gonna ask how could this happen on a clean isntall seeing as last install was fine but I think by default there was only LXC and I added new connection not seeing the 2 qemu options. I don't remember having to add a connection last time and there was no LXC so not sure why LXC is present now by default when it wasn't 2 days ago on the old up-to-date install. Will try setting up again and report back soon.

Offline

#9 2017-12-07 23:07:19

dominicm
Member
Registered: 2015-01-03
Posts: 92

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

That was indeed the issue, such a silly mistake caused so much headaches... Big thanks for your help! I can now have the VM mine some etherium / heat the room, it was starting to get chilly smile

OVMF works just fine now, only real issue now is that it seems I need to install virtio drivers again. Windows BSODs with unreachable drive error... This seems odd to me, drivers are installed on the same drive as guest OS so why do they need to be re-installed? Changed bus type to sata for now which seems fine, maybe not even worth swithing to virtio...

Offline

#10 2017-12-08 00:12:56

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED] Libvirt fails to detect OVMF/UEFI firmware

Great! Don't forget to mark the thread with "[SOLVED]" wink

If you don't plan on using disk I/O intensive applications, you can probably leave it like that (I'd personally still change it anway though ;D).
If you do plan on running I/O intensive applications, you should try to reinstall the VirtIO drivers in Windows. They will definitely perform better.

Last edited by Omar007 (2017-12-08 00:13:40)

Offline

Board footer

Powered by FluxBB