How to complete efi support based on libvirt in Centos

[root@urumqi ~]# dnf list |grep ovmf
[root@urumqi ~]#
[root@urumqi ~]# wget -O /etc/yum.repos.d/firmware.repo http://www.kraxel.org/repos/firmware.repo
--2019-11-27 13:54:14--  http://www.kraxel.org/repos/firmware.repo
Resolving www.kraxel.org (www.kraxel.org)... 94.130.25.49, 2a01:4f8:c0c:2301::2
Connecting to www.kraxel.org (www.kraxel.org)|94.130.25.49|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.kraxel.org/repos/firmware.repo [following]
--2019-11-27 13:54:16--  https://www.kraxel.org/repos/firmware.repo
Connecting to www.kraxel.org (www.kraxel.org)|94.130.25.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 174
Saving to: ‘/etc/yum.repos.d/firmware.repo’

100%[====================================================================================================================================================================================================>] 174         --.-K/s   in 0s      

2019-11-27 13:54:18 (7.80 MB/s) - ‘/etc/yum.repos.d/firmware.repo’ saved [174/174]

[root@urumqi ~]# dnf update
firmware for qemu, built by jenkins, fresh from git repos                                                                                                                                                     4.7 kB/s | 8.0 kB     00:01    
Dependencies resolved.
Nothing to do.
Complete!
[root@urumqi ~]# dnf list |grep ovmf
edk2.git-ovmf-ia32.noarch                               0-20191118.1292.gbd85bf54c2          qemu-firmware-jenkins
edk2.git-ovmf-x64.noarch                                0-20191118.1292.gbd85bf54c2          qemu-firmware-jenkins
[root@urumqi ~]# 
[root@urumqi ~]# dnf install edk2.git-ovmf
Last metadata expiration check: 0:01:29 ago on Wed 27 Nov 2019 01:54:30 PM CST.
No match for argument: edk2.git-ovmf
Error: Unable to find a match: edk2.git-ovmf
[root@urumqi ~]# dnf install edk2.git-ovmf-x64
Last metadata expiration check: 0:01:56 ago on Wed 27 Nov 2019 01:54:30 PM CST.
Dependencies resolved.
============================================================================================================================
 Package                     Arch             Version                                 Repository                       Size
============================================================================================================================
Installing:
 edk2.git-ovmf-x64           noarch           0-20191118.1292.gbd85bf54c2             qemu-firmware-jenkins           7.4 M

Transaction Summary
============================================================================================================================
Install  1 Package

Total download size: 7.4 M
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
edk2.git-ovmf-x64-0-20191118.1292.gbd85bf54c2.noarch.rpm                                                                                                                                                       19 kB/s | 7.4 MB     06:46    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          19 kB/s | 7.4 MB     06:46     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1 
  Installing       : edk2.git-ovmf-x64-0-20191118.1292.gbd85bf54c2.noarch                                                                                                                                                                 1/1 
  Verifying        : edk2.git-ovmf-x64-0-20191118.1292.gbd85bf54c2.noarch                                                                                                                                                                 1/1 

Installed:
  edk2.git-ovmf-x64-0-20191118.1292.gbd85bf54c2.noarch                                                                                                                                                                                        

Complete!
[root@urumqi ~]# 
[root@urumqi ~]# cat >>/etc/libvirt/qemu.conf <<EOQEMU
> nvram = [
> "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
> ]
> EOQEMU
[root@urumqi ~]# 

重启一下服务

[root@urumqi ~]# systemctl restart libvirtd
[root@urumqi ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-12-02 14:56:36 CST; 9s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 4097 (libvirtd)
    Tasks: 19 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           ├─3433 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libex...
           ├─3434 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libex...
           └─4097 /usr/sbin/libvirtd

Dec 02 14:56:36 xtwj181 systemd[1]: Starting Virtualization daemon...
Dec 02 14:56:36 xtwj181 systemd[1]: Started Virtualization daemon.
Dec 02 14:56:37 xtwj181 dnsmasq[3433]: read /etc/hosts - 2 addresses
Dec 02 14:56:37 xtwj181 dnsmasq[3433]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Dec 02 14:56:37 xtwj181 dnsmasq-dhcp[3433]: read /var/lib/libvirt/dnsmasq/default.hostsfile

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

参考文献

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qwfys200

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值