您尚未登录。

#1 2021-12-02 19:38:15

haomingbai
会员
注册时间: 2021-06-14
帖子: 31

libvirtd.service启动不了

[haomingbai@haomingbai-PC ~]$ systemctl status libvirtd
○ libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: inactive (dead) since Thu 2021-12-02 19:32:38 CST; 2min 13s ago
TriggeredBy: ● libvirtd.socket
             ● libvirtd-ro.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
    Process: 3412 ExecStart=/usr/bin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 3412 (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 32768)
     Memory: 55.7M
        CPU: 116ms
     CGroup: /system.slice/libvirtd.service
             ├─623 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
             └─624 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper

12月 02 19:32:38 haomingbai-PC dnsmasq-dhcp[623]: read /var/lib/libvirt/dnsmasq/default.hostsfile
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: libvirt version: 7.9.0
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: hostname: haomingbai-PC
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: 未在路径中找到 'dmidecode': 没有那个文件或目录
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: 配置文件语法错误: /etc/libvirt/qemu.conf:842: 需要一个值
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: QEMU 的初始化状态驱动器失败:配置文件语法错误: /etc/libvirt/qemu.conf:842: 需要一个值
12月 02 19:32:38 haomingbai-PC libvirtd[3412]: 驱动器状态初始化失败
12月 02 19:32:38 haomingbai-PC systemd[1]: libvirtd.service: Deactivated successfully.
12月 02 19:32:38 haomingbai-PC systemd[1]: libvirtd.service: Unit process 623 (dnsmasq) remains running after unit stopped.
12月 02 19:32:38 haomingbai-PC systemd[1]: libvirtd.service: Unit process 624 (dnsmasq) remains running after unit stopped.

然后我把这一段取消掉就可以了

nvram = [
    "/usr/share/edk2-ovmf/x64/OVMF_CODE.fd:/usr/share/edk2-ovmf/x64/OVMF_VARS.fd",
    "/usr/share/edk2-ovmf/x64/OVMF_CODE.secboot.fd:/usr/share/edk2-ovmf/x64/OVMF_VARS.fd",
#   "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd",
#   "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd"
]

但是

[haomingbai@haomingbai-PC ~]$ ls /usr/share/edk2-ovmf/x64/
OVMF_CODE.fd  OVMF_CODE.secboot.fd  OVMF.fd  OVMF_VARS.fd

我还是想在虚拟机里用efi

离线

#2 2021-12-03 01:24:32

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 7,018
个人网站

Re: libvirtd.service启动不了

你装一下 dmidecode 呢?

离线

#3 2021-12-03 02:06:08

haomingbai
会员
注册时间: 2021-06-14
帖子: 31

Re: libvirtd.service启动不了

依云 说:

你装一下 dmidecode 呢?

貌似不行,还是报语法错误

离线

#4 2021-12-06 20:35:39

haomingbai
会员
注册时间: 2021-06-14
帖子: 31

Re: libvirtd.service启动不了

破案了,只要把下面被注释的那两行删掉,再把后一行的逗号去掉就可以了,原因不明

离线

页脚