You are not logged in.

#1 2020-01-02 10:51:50

dreamycrane
Member
Registered: 2019-03-18
Posts: 25

[kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

Hi Guys,
It has been some time now that i am unable to boot uefi VMs in Virtual Manger.
I did create a .json file in /etc/qemu/firmware with the contents:

{
    "description": "UEFI firmware for x86_64",
    "interface-types": [
        "uefi"
    ],
    "mapping": {
        "device": "flash",
        "executable": {
            "filename": "/usr/share/ovmf/x64/OVMF_CODE.fd",
            "format": "raw"
        },
        "nvram-template": {
            "filename": "/usr/share/ovmf/x64/OVMF_VARS.fd",
            "format": "raw"
        }
    },
    "targets": [
        {
            "architecture": "x86_64",
            "machines": [
                "pc-i440fx-*",
                "pc-q35-*"
            ]
        }
    ],
    "features": [
        "acpi-s3",
        "amd-sev",
        "verbose-dynamic"
    ],
    "tags": [

    ]
}

I even installed qemu-arch extra (all 700MB of it) BUT although the UEFI firmware is not greyed out in Virt-Manager ,upon starting the VM i constantly get

 Unable to complete install: 'operation failed: unable to find any master var store for loader: /usr/share/qemu/edk2-x86_64-code.fd'

Versions of packages: libvirt-5.10.0-1  qemu-4.2.0-1  virt-manager-2.2.1-2
Being cutting edge is super cool but the developers should swiftly fix this error.
Otherwise they should not push fatal changes to the users.
Any feedback is much sought for.
New Years Best Wishes
Andreas

Last edited by dreamycrane (2020-01-02 14:56:50)

Offline

#2 2020-01-02 11:12:06

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

dreamycrane wrote:

Being cutting edge is super cool but the developers should swiftly fix this error.

Have you reported this upstream as a bug? The developers won't fix it unless they know about it.

Can you boot QEMU directly in UEFI mode? I don't use virt-manager so I can't really help with that.

Offline

#3 2020-01-02 11:39:52

dreamycrane
Member
Registered: 2019-03-18
Posts: 25

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

Head_on_a_Stick
Thanks for your swift reply....
yes apparently there is an old bug report about his:
https://bugs.archlinux.org/task/64175
""Can you boot QEMU directly in UEFI mode?""
You mean using virt-install?
I'd rather not.

Last edited by dreamycrane (2020-01-02 11:41:47)

Offline

#4 2020-01-02 11:58:54

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

dreamycrane wrote:

""Can you boot QEMU directly in UEFI mode?""
You mean using virt-install?
I'd rather not.

Well I meant to try using the qemu-system command directly to narrow down the source of the problem but the bug report seems clear. It's a packaging issue: https://bugzilla.redhat.com/show_bug.cgi?id=1763477#c9

Offline

#5 2020-01-02 12:46:34

dreamycrane
Member
Registered: 2019-03-18
Posts: 25

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

But i did create the .json file in /etc/qemu/firmware.
It seemes either qemu,or libvirt or virt-manager is NOT looking in this location.
So where should the FW descriptors files be placed??????????

Offline

#6 2020-01-02 12:59:20

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

As a nasty work around you could try removing the json files supplied by the qemu package for the EDK2 firmware that is not supplied by the package.

#rm /usr/share/qemu/firmware/*edk2*.json

Offline

#7 2020-01-02 14:52:34

dreamycrane
Member
Registered: 2019-03-18
Posts: 25

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

loqs wrote:

As a nasty work around you could try removing the json files supplied by the qemu package for the EDK2 firmware that is not supplied by the package.

#rm /usr/share/qemu/firmware/*edk2*.json

I did that but to no avail.
I resolved the issue with a dirty nasty workaround.
Apparently either virt-manager-or libvirt or qemu are NOT creating VARS.fd entries in
/var/lib/libvirt/qemu/nvram
So I manually create these entries thus:

cp /usr/share/ovmf/x64/OVMF_VARS.fd /var/lib/libvirt/qemu/nvram/<vm-name>_VARS.fd  ####

Then I enable xml editing in Virual Manager UI and in the VM's "<os> </os>" section I append:

<loader readonly="yes" type="pflash">/usr/share/ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/<vm-name>_VARS.fd</nvram>

Then I AM able to start the VM.
............FINALLY

This is a dirty disgusting workaround and (@developers) should be fixed asap.

Otherwise they should have left the sweet little nvram=[.............] in /etc/libvirt/qemu.conf intact.
If they want FW descriptors in .json format then please be ready to support them properly........
Else they cause suffering and frustrations to users. smile

EDIT:
After further testing I found out that one does NOT need to manually edit the VM xml file.
Just have the above .json file present in /etc/qemu/firmware dir AND only copy the ....VARS.fd TO the /var/lib/libvirt/qemu/nvram.
Thank you all for your kind help.
Best Regards
smile

Last edited by dreamycrane (2020-01-02 16:47:59)

Offline

#8 2020-01-02 17:15:50

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

Perhaps the .json file needs adjustment to avoid having to manually copy OVMF_VARS.fd?
Edit:
seems it is not the .json https://www.redhat.com/archives/libvir- … 01078.html

Last edited by loqs (2020-01-02 20:48:55)

Offline

#9 2020-01-09 02:13:31

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

I ran into this problem today when trying to use virt-manager to create a VM with UEFI-boot.

At the end of the VM creation process, I got a similar error to OP:

"operation failed: unable to find any master var store for loader: /usr/share/ovmf/x64/OVMF_CODE.fd"

Leaving me unable to complete the VM creation process (hence no XML file was created for me to edit).

Luckily, virt-manager allows you to inspect the XML during the VM creation process, so I copied it to a temporary file, then used "virsh define" to manually create the VM from the command line. For "virsh define" to work, I had to first manually copy the VARS.fd file to /var/lib/libvirt/qemu/nvram/, as described in the previous posts.

Afterwards, I was able to boot the VM. Other than copy-pasting the XML from virt-manager to a temporary file and calling "virsh define" on it, I did not have to do any editing of the XML.

Offline

#10 2020-01-09 16:17:58

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [kind-of-SOLVED]Libvirt ovmf dreaded error still persists.

Should be fixed by libvirt-5.10.0-2 plus ovmf 1:r26976.bd85bf54c2-1 https://bugs.archlinux.org/task/64175#comment185144

Offline

Board footer

Powered by FluxBB