http://www.tianocore.org/ovmf/
OVMF is an EDK II based project to enable UEFI support for Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.
/usr/share/edk2.git/ovmf-x64/
mkdir /var/lib/libvirt/qemu/nvram/
/etc/libvirt/qemu.conf
nvram = [ "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd" ]
virsh -c qemu:///system edit VM-UEFI
<os> <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> </os>
Liens :
sudo dpkg -i ovmf_0-20160408.ffea0a2c-2_all.deb
sudo dnf install dnf-plugins-core sudo dnf config-manager --add-repo http://www.kraxel.org/repos/firmware.repo sudo dnf install edk2.git-ovmf-x64
Certaine VM créés avec une ROM nécessite une reconfig pour booter avec une autre ROM en fonction de comment son nommé les périphériques par la rom je suppose (par exemple : vda au lieu de sda si virtio driver utilisé)
Avec le shell efi (un truc du genre) :
bcfg boot -opt 3 "initrd=\initramfs-linux.img root=/dev/sda2"