我在centos7中安装了kvm包,我遇到这个问题如何解决这个问题。
完整错误在这里
Unable to connect to libvirt.
no connection driver available for qemu:///system
Libvirt URI is: qemu:///system
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 969, in _open_thread
self._backend.open(self._do_creds_password)
File "/usr/share/virt-manager/virtinst/connection.py", line 157, in open
open_flags)
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: no connection driver available for qemu:///system
更多信息
[AsNaDa@localhost ~]$ systemctl is-enabled libvirtd.service
enabled
[AsNaDa@localhost ~]$ systemctl is-active libvirtd.service
active
[AsNaDa@localhost ~]$ rpm -qf /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
libvirt-daemon-driver-qemu-1.2.8-16.el7_1.2.x86_64
[AsNaDa@localhost ~]$
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
答案1
我在 CentOS 7 中遇到了同样的问题。就我而言,升级device-mapper-libs
解决了问题:
yum upgrade device-mapper-libs
就我而言,通过检查以下状态给出了一些提示libvirtd
:
service libvirtd status
出现如下错误,因此如果您遇到类似问题,升级device-mapper-libs
应该会有所帮助。
Oct 18 17:55:34 localhost.localdomain libvirtd[6130]: failed to load
module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so
/usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so: symbol
dm_task_...k time reference
Oct 18 17:55:34 localhost.localdomain libvirtd[6130]: failed to load
module /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
symbol: virStorageFileCreate<br>
答案2
为了能够virt-manager
在您想要控制(本地)的同一台计算机上正确运行,您需要安装以下软件包:
qemu-kvm qemu-img virt-manager libvirt libvirt-python python-virtinst libvirt-client virt-install virt-viewer
重新检查它们是否都正确安装在您的服务器上,或者只需运行以下语句:
# yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python python-virtinst libvirt-client virt-install virt-viewer
如果您的系统上未安装某些描述的软件包,则会安装它们(并且将跳过现有的软件包)。
此外,还应在计算机上启用并运行以下 systemd 服务:
libvirtd.service libvirtd.socket libvirt-guests.service
祝你好运!
答案3
我遇到了同样的问题,重新启动 libvirtd 服务为我解决了这个问题:
sudo service libvirtd stop
sudo service libvirtd start