补充:是在vmware上安装的centos7,利用centos7搭建了xen,想利用virt-manager 安装 domU,找的网上教程一步步设置,在设置新连接的时候,错误显示如下:
无法 recv 数据:Warning: Permanently added 'XXXXX' (ECDSA) to the list of known hosts.
Authentication failed.: Connection reset by peer
确认在远程主机中正在
运行 'libvirtd' 守护进程。
Libvirt URI is: xen+ssh://root@XXXXXX/
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 862, in _do_open
self._backend.open(self._do_creds_password)
File "/usr/share/virt-manager/virtinst/connection.py", line 161, 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: 无法 recv 数据:Warning: Permanently added 'XXXXX' (ECDSA) to the list of known hosts.
Authentication failed.: Connection reset by peer
编辑一下hosts文件。把'XXXXX' 这个ip加入允许列表
检查账号密码是否正确
https://blog.csdn.net/bill20100829/article/details/112489025
libvirt -d 启动一下服务
说错了,是 systemctl start libvirtd
您可能需要注销并重新登录
假设/etc/libvirt/libvirtd.conf
具有:
# Set the UNIX domain socket group ownership. This can be used to
# allow a 'trusted' set of users access to management capabilities
# without becoming root.
#
# This is restricted to 'root' by default.
unix_sock_group = "libvirtd"
# Set the UNIX socket permissions for the R/O socket. This is used
# for monitoring VM status only
#
# Default allows any user. If setting group ownership, you may want to
# restrict this too.
unix_sock_ro_perms = "0777"
# Set the UNIX socket permissions for the R/W socket. This is used
# for full management of VMs
#
# Default allows only root. If PolicyKit is enabled on the socket,
# the default will change to allow everyone (eg, 0777)
#
# If not using PolicyKit and setting group ownership for access
# control, then you may want to relax this too.
unix_sock_rw_perms = "0770"
如果您的用户是libvirtd
组的成员,它应该可以工作。
$ cat /etc/group|grep $USER
vagrant:x:1000:
libvirtd:x:116:ubuntu,vagrant
如果您的用户不在组中,您需要添加它:
$ sudo usermod -a -G libvirtd $USER
如果您的用户已经在/etc/group
中的组中,请检查组的输出:
$ groups
vagrant libvirtd
如果您没有看到libvirtd
,您需要退出并重新登录。
补充一下问题,当我使用virt-manager连接时 会弹出需要我安装openssh-askpass相关内容?