Enable UEFI for QEMU KVM on Fedora

May 31, 2018 Linux, Virtualization

Enable UEFI for QEMU KVM on Fedora
UEFI (Unified Extensible Firmware Interface) has become a successfull successor of an outworn and obsolete BIOS firmware. Emulating UEFI based hardware on KVM/QEMU Virtual Machine is possible thanks to so called OVMF (Open Virtual Machine Firmware), which comes from EDK2 (EFI Development Kit), UEFI reference implementation. OVMF is available as an RPM package for RPM based distros (CentOS, Fedora, Red Hat). In case of Fedora release all we need is edk2-ovmf RPM package.

For Fedora 25 release, edk2-ovmf package is available in the updates repo:

[root@tuxfixer ~]# dnf info edk2-ovmf
Last metadata expiration check: 2:52:09 ago on Fri Jun  1 12:49:36 2018.
Available Packages
Name        : edk2-ovmf
Arch        : noarch
Epoch       : 0
Version     : 20161105git3b25ca8
Release     : 1.fc25
Size        : 2.8 M
Repo        : updates
Summary     : Open Virtual Machine Firmware
URL         : http://www.tianocore.org/edk2/
License     : BSD and OpenSSL
Description : EFI Development Kit II
            : Open Virtual Machine Firmware (x64)

Install the package using the below command:

[root@tuxfixer ~]# dnf install edk2-ovmf

During new VM creation, on virt-manager VM customization screen go to Overview tab and set Firmware to UEFI x86_64:

Enable UEFI for QEMU KVM on CentOS 7

If you are creating VM from command line using virt-install command, add –boot uefi parameter to your command. Example:

[root@tuxfixer ~]# virt-install --name centos7 --ram 2048 --boot uefi ...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.