配置qemu支持UEFI启动
1.编译UEFI 固件
已编译完毕,编译完毕的固件地址:OVMF1124.fd-Linux文档类资源-CSDN下载
2.配置qemu
配置 libvirtd以启用UEFI
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",
]
具体的目录以实际OVMF.fd存放的目录为准,我这里指定的是
nvram = [ "/usr/share/qemu-kvm/OVMF1124.fd:/usr/share/qemu-kvm/OVMF1124.fd" ]
重启libvirtd
systemctl restart libvirtd
此时如果手动创建虚拟机,便可在最后的配置项中看到选择UEFI BIOS的选项(此图仅为示例)。