From Fedora Project Wiki

(Point to moved wiki page, change install steps)
(Update with latest support)
Line 10: Line 10:
<pre>
<pre>
sudo wget http://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo
sudo wget http://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo
sudo yum install edk2.git-ovmf-x64
sudo yum install edk2.git-ovmf-x64 edk2.git-aarch64
</pre>
</pre>
Note, these instructions are also used for setting up aarch64 UEFI support. For strictly x86 support, the aarch64 references aren't required.
=== Configure libvirtd to advertise UEFI support ===
Libvirt needs to know about UEFI->NVRAM config file mapping, so it can advertise it to tools like virt-manager/virt-install.
As root, edit /etc/libvirt/qemu.conf, and add this section at the top of the file:
  nvram = [
    "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd",
    "/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw",
  ]
Then restart libvirtd: <code>sudo systemctl restart libvirtd</code>


|actions=
|actions=
Line 17: Line 32:
=== Install VM with virt-install ===
=== Install VM with virt-install ===


Follow one of the VM install test cases with virt-install, but also append the options:
Follow one of the VM install test cases with virt-install, but also append the option <code>--boot uefi</code>. Like:
 
  sudo virt-install --boot uefi ...
 
=== Install VM with virt-manager ===
 
Follow one of the VM install test cases for virt-manager. When you get to the final page of the 'New VM' wizard, do the following:


  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
* Click 'Customize before install', then select 'Finish'
* On the 'Overview' screen, Change the 'Firmware' field to select the 'OVMF x86_64' option.
* Click 'Begin Installation'
* Verify the VM installs correctly


|results=
|results=

Revision as of 20:42, 14 April 2015

Description

Install a Fedora VM using UEFI/OVMF.

Setup

Installing UEFI firmware for x86 QEMU (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: Using UEFI with QEMU

sudo wget http://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo
sudo yum install edk2.git-ovmf-x64 edk2.git-aarch64

Note, these instructions are also used for setting up aarch64 UEFI support. For strictly x86 support, the aarch64 references aren't required.

Configure libvirtd to advertise UEFI support

Libvirt needs to know about UEFI->NVRAM config file mapping, so it can advertise it to tools like virt-manager/virt-install.

As root, edit /etc/libvirt/qemu.conf, and add this section at the top of the file:

 nvram = [
    "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd",
    "/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw",
 ]

Then restart libvirtd: sudo systemctl restart libvirtd

How to test

Install VM with virt-install

Follow one of the VM install test cases with virt-install, but also append the option --boot uefi. Like:

 sudo virt-install --boot uefi ...

Install VM with virt-manager

Follow one of the VM install test cases for virt-manager. When you get to the final page of the 'New VM' wizard, do the following:

  • Click 'Customize before install', then select 'Finish'
  • On the 'Overview' screen, Change the 'Firmware' field to select the 'OVMF x86_64' option.
  • Click 'Begin Installation'
  • Verify the VM installs correctly

Expected Results

Guest installations start and perform without any issues. Guest is bootable after install completes.