其他分享
首页 > 其他分享> > KVM创建支持UEFI启动的虚拟机

KVM创建支持UEFI启动的虚拟机

作者:互联网

环境:rhel7.5

一.配置firmware源

wget http://www.kraxel.org/repos/firmware.repo -O /etc/yum.repos.d/firmware.repo

二.安装ovmf

yum install edk2.git-ovmf-x64
yum install OVMF #uefi的virt-manger图形组件
三.配置 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",

]

四.重启libvirtd

systemctl restart libvirtd

五.创建虚拟机

virt-manager
KVM创建支持UEFI启动的虚拟机

这样就可以选择的固件是uefi
注意,如果视频模式为vmvga或QXL会导致启动时黑屏,换成vga模式就可以了

标签:git,edk2,virt,虚拟机,KVM,libvirtd,UEFI,ovmf
来源: https://blog.51cto.com/13810716/2440319