As of late an update of libvirt(app-emulation/libvirt-5.10.0 or even earlier) has caused all new uefi booting VMs to be unable to boot.
It used to be the case before that in
/etc/libvirt/qemu.conf
one would have an entry like
Code: Select all
nvram = [
"/usr/share/edk2-ovmf/OVMF_CODE.fd:/usr/share/edk2-ovmf/OVMF_VARS.fd"
]
As a result you will get errors when trying to start uefi VMs.
Either the UEFI boot button will be greyed out in Virtual Manager or even if not the VM will NOT boot.
A dirty work around:
Create a file:
/etc/qemu/firmware/ovmf.json
with the following content:
Code: Select all
{
"description": "UEFI firmware for x86_64",
"interface-types": [
"uefi"
],
"mapping": {
"device": "flash",
"executable": {
"filename": "/usr/share/edk2-ovmf/OVMF_CODE.fd",
"format": "raw"
},
"nvram-template": {
"filename": "/usr/share/edk2-ovmf/OVMF_VARS.fd",
"format": "raw"
}
},
"targets": [
{
"architecture": "x86_64",
"machines": [
"pc-i440fx-*",
"pc-q35-*"
]
}
],
"features": [
"acpi-s3",
"amd-sev",
"verbose-dynamic"
],
"tags": [
]
}
If still unable then BEFORE CREATING the uefi VM <vm-name> also run:
Code: Select all
cp /usr/share/edk2-ovmf/OVMF_VARS.fd /var/lib/libvirt/qemu/nvram/<vm-name>_VARS.fd
You might also wish to create another .json file for secure boot VMs.
If you also get an error about "Unable to get boot time from host" then in
/etc/libvirt/qemu.conf
append
Code: Select all
remember_owner = 0
AH by the way the libvirt team SHOULD DO their homework before pushing detrimental changes to the users and thus creating confusion and frustration.
