感谢支持
我们一直在努力

使用VMware虚拟机安装virt-manager unable to connect to libvirt的处理办法

RHEL7.0在安装完成virt-manager后,启动libvirtd服务进程

[root@demo Desktop]# systemctl enable libvirtd
[root@demo Desktop]# systemctl start libvirtd

在使用virt-manager命令启动虚拟机管理软件时,提示unable to connect to libvirt

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

查看libvirtd的状态

[root@demo Desktop]# systemctl status libvirtd
libvirtd.service – Virtualization daemon
  Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
  Active: active (running) since Mon 2015-08-31 21:27:48 CST; 4min 47s ago
    Docs: man:libvirtd(8)
          http://libvirt.org
 Main PID: 9837 (libvirtd)
  CGroup: /system.slice/libvirtd.service
          └─9837 /usr/sbin/libvirtd
 
Aug 31 21:27:48 demo.example.com libvirtd[9837]: libvirt version: 1.2.8, package: 16.el7_1.3 (CentOS BuildSystem <http://bugs.cent…os.org)
Aug 31 21:27:48 demo.example.com libvirtd[9837]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage…ference
Aug 31 21:27:48 demo.example.com libvirtd[9837]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so…eCreate
Aug 31 21:27:48 demo.example.com libvirtd[9837]: Module /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so not accessible
Aug 31 21:27:48 demo.example.com systemd[1]: Started Virtualization daemon.
Aug 31 21:28:19 demo.example.com systemd[1]: Started Virtualization daemon.
Aug 31 21:29:14 demo.example.com libvirtd[9837]: no connection driver available for qemu:///system
Aug 31 21:29:14 demo.example.com libvirtd[9837]: End of file while reading data: Input/output error
Hint: Some lines were ellipsized, use -l to show in full.

此时可能是驱动程序的安装有问题,更新device-mapper包

[root@demo Desktop]# yum update device-mapper

重启libvirtd服务

[root@demo Desktop]# systemctl restart libvirtd
[root@demo Desktop]# systemctl status libvirtd
libvirtd.service – Virtualization daemon
  Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
  Active: active (running) since Mon 2015-08-31 21:34:23 CST; 7s ago
    Docs: man:libvirtd(8)
          http://libvirt.org
 Main PID: 10082 (libvirtd)
  CGroup: /system.slice/libvirtd.service
          ├─10082 /usr/sbin/libvirtd
          ├─10185 /sbin/dnsmasq –conf-file=/var/lib/libvirt/dnsmasq/default.conf –dhcp-script=/usr/libexec/libvirt_leaseshelper
          └─10186 /sbin/dnsmasq –conf-file=/var/lib/libvirt/dnsmasq/default.conf –dhcp-script=/usr/libexec/libvirt_leaseshelper
 
Aug 31 21:34:23 demo.example.com systemd[1]: Started Virtualization daemon.
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: started, version 2.66 cachesize 150
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no…et auth
Aug 31 21:34:26 demo.example.com dnsmasq-dhcp[10185]: DHCP, IP range 192.168.122.2 — 192.168.122.254, lease time 1h
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: reading /etc/resolv.conf
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: using nameserver 202.103.44.150#53
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: using nameserver 202.103.24.68#53
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: read /etc/hosts – 4 addresses
Aug 31 21:34:26 demo.example.com dnsmasq[10185]: read /var/lib/libvirt/dnsmasq/default.addnhosts – 0 addresses
Aug 31 21:34:26 demo.example.com dnsmasq-dhcp[10185]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Hint: Some lines were ellipsized, use -l to show in full.

此时libvirtd服务显示为正常,没有出现报错,再次运行virt-manager,可以正常连接

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-01/126959.htm

赞(0) 打赏
转载请注明出处:服务器评测 » 使用VMware虚拟机安装virt-manager unable to connect to libvirt的处理办法
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏