我正在尝试为 KVM 设置 GPU 直通,但一直面临这个严重问题。基本上,它告诉我要验证 libvirt 是否正在运行。
Unable to connect to libvirt qemu:///system.
Verify that the 'libvirtd' daemon is running.
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 922, in _do_open
self._backend.open(cb, data)
File "/usr/share/virt-manager/virtinst/connection.py", line 153, in open
conn = libvirt.openAuth(self._open_uri,
File "/usr/lib/python3/dist-packages/libvirt.py", line 148, in openAuth
raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
当我检查 libvirt 的状态时,它确实没有处于活动状态。但我自己找不到解决方案。
*aleeq@aleeq-MS-7A15:~$ sudo systemctl status libvirtd
[sudo] password for aleeq:
× libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor pres>
Active: failed (Result: start-limit-hit) since Wed 2022-03-02 21:27:26 +08>
TriggeredBy: × libvirtd-ro.socket
× libvirtd.socket
× libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 2948 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, sta>
Main PID: 2948 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 32768)
Memory: 9.7M
CPU: 168ms
CGroup: /system.slice/libvirtd.service
├─1198 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa>
└─1199 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa>
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq[1198]: read /var/lib/libvirt/dnsmasq/defa>
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq-dhcp[1198]: read /var/lib/libvirt/dnsmasq>
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Deactivated success>
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1198 (>
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1199 (>
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Start request repea>
lines 1-23...skipping...
× libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Wed 2022-03-02 21:27:26 +08; 5min ago
TriggeredBy: × libvirtd-ro.socket
× libvirtd.socket
× libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 2948 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=0/SUCCESS)
Main PID: 2948 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 32768)
Memory: 9.7M
CPU: 168ms
CGroup: /system.slice/libvirtd.service
├─1198 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─1199 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq[1198]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq-dhcp[1198]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Deactivated successfully.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1198 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1199 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Start request repeated too quickly.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Failed with result 'start-limit-hit'.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1198 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1199 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: Failed to start Virtualization daemon.
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-27/27 (END)
× libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Wed 2022-03-02 21:27:26 +08; 5min ago
TriggeredBy: × libvirtd-ro.socket
× libvirtd.socket
× libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 2948 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=0/SUCCESS)
Main PID: 2948 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 32768)
Memory: 9.7M
CPU: 168ms
CGroup: /system.slice/libvirtd.service
├─1198 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>
└─1199 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq[1198]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Mac 02 21:27:26 aleeq-MS-7A15 dnsmasq-dhcp[1198]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Deactivated successfully.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1198 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1199 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Start request repeated too quickly.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Failed with result 'start-limit-hit'.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1198 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: libvirtd.service: Unit process 1199 (dnsmasq) remains running after unit stopped.
Mac 02 21:27:26 aleeq-MS-7A15 systemd[1]: Failed to start Virtualization daemon.
~
~
~
~
~
~
~
~
~
~
lines 1-27/27 (END)*
我期待得到解决方案。提前感谢您的帮助!