Mac OS X 上的 virt-manager 无法连接到远程 libvirtd

Mac OS X 上的 virt-manager 无法连接到远程 libvirtd

我已通过 homebrew 在 Mac OS X 10.11.5 上安装了 virt-manager 1.3.2。当我尝试连接到在另一台机器 192.168.1.70 上运行的远程 libvirtd 守护程序时,我无法连接。但是,当我尝试从同一台 Mac 上运行 Ubuntu 的 VMware VM 连接到同一个 libvirtd 时,一切正常。这是我从 Mac OS 上的 virt-manager 收到的错误消息:

Unable to connect to libvirt.

An error occurred, but the cause is unknown

Verify that the 'libvirtd' daemon is running
on the remote host.

Libvirt URI is: qemu+ssh://[email protected]:1705/system?socket=/var/run/libvirt/system

Traceback (most recent call last):
  File "/usr/local/Cellar/virt-manager/1.3.2/libexec/share/virt-manager/virtManager/connection.py", line 903, in _do_open
    self._backend.open(self._do_creds_password)
  File "/usr/local/Cellar/virt-manager/1.3.2/libexec/share/virt-manager/virtinst/connection.py", line 148, in open
    open_flags)
  File "/usr/local/Cellar/virt-manager/1.3.2/libexec/vendor/lib/python2.7/site-packages/libvirt.py", line 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: An error occurred, but the cause is unknown

答案1

值得一提的是,我最终找到了 Billygoat32 在 github 上发布的一个解决方法:

有趣的是...尝试通过 UI 添加主机时出现上述错误。使用此命令可以添加它并可用于将来的连接:

virt-manager -c 'qemu+ssh://user@libvirthost/system?socket=/var/run/libvirt/libvirt-sock'

相关内容