I rely heavily on virtualisation for testing things and making sure they work as they are supposed to.
Today I was trying to probe to a vendor that their Windows installer was failing in computers with big hard drives, so I went to my only box that has few TB of spare space and created a VM. The host computer is running CentOS 7 and I run KVM on it to virtualise things.
As I soon discovered KVM by default does not come with UEFI boot out of the box, so my Windows installation on a 3TB virtual drive was creating a 2TB partition and leaving the rest un-used. You probably knew that “legacy” boot mode only supports 2.2TB disks and that for bigger drives you must do a firmware boot (a.k.a. UEFI boot). If you didn’t know, now you do.
So this is how you install UEFI into KVM and configure your VM to use it.
Navigate to your repos folder and get the .repo file for kraxel
bash-3.2$ cd /etc/yum.repos.d/ && wget http://www.kraxel.org/repos/firmware.repo
Install the OVMF project for 64bit
bash-3.2$ su -c 'yum install edk2.git-ovmf-x64 -y'