Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Qemu/Libvirt/Virt-Manager VM uefi-boot error and how to fix

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
alamahant
Advocate
Advocate
Posts: 4033
Joined: Sat Mar 23, 2019 12:12 pm

Qemu/Libvirt/Virt-Manager VM uefi-boot error and how to fix

  • Quote

Post by alamahant » Tue Jan 07, 2020 3:16 am

Hi Guys,
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"
]
However this way of handling the nvram location has become 'obsolete' and it will totally be ignored by the libvirtd daemon.
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": [

    ]
}

Then try to boot an uefi VM.
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
Now try again to boot --successfully this time your VM.
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
Thats it!!!
AH by the way the libvirt team SHOULD DO their homework before pushing detrimental changes to the users and thus creating confusion and frustration.

:D :D :D
Top
Post Reply
1 post • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic