Centos

kvm 虛擬管理器連接失敗

  • March 4, 2019

我在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 # 

我在 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>

引用自:https://unix.stackexchange.com/questions/195948