From Fedora Project Wiki
Description
Install a Fedora VM using UEFI/OVMF.
Setup
Installing UEFI firmware (OVMF)
OVMF isn't in Fedora yet due to some licensing issues, so we need to get the firmware from an external repo. More info on this page: Testing secureboot with KVM
sudo wget http://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo # Disable by default, likely preferred for QA sudo sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/firmware.repo sudo yum --enablerepo=qemu-firmware-jenkins install edk2.git-ovmf-x64
How to test
Install VM with virt-install
Follow one of the VM install test cases with virt-install, but also append the options:
sudo virt-install --boot loader_ro=yes,loader_type=pflash,loader=/usr/share/edk2.git/ovmf-x64/OVMF-pure-efi.fd,nvram_template=/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd
Expected Results
Guest installations start and perform without any issues. Guest is bootable after install completes.