[virt-tools-list] How to connect virt-manager to two hosts?

Pavel Hrdina phrdina at redhat.com
Fri Oct 23 10:29:14 UTC 2015


On Fri, Oct 23, 2015 at 09:13:11PM +1100, Phill Edwards wrote:
> I have 2 Centos 7.1 servers running KVM - let's call them KVM1 and KVM2.
> Virt-manager is installed on KVM2 and I run that from my Windows PC using
> VxXsrv which I believe is a fork of Xming. This allows me to configure the
> VMs on KVM2 with virt-manager.
> 
> I believe it's possible to have virt-manager connect to multiple hosts so
> I'm trying to get it to access KVM1 as well, but I keep getting an error
> which I don't know how to fix:
> 
>    Unable to connect to libvirt.
>    You need to install openssh-askpass or similar to connect to this host.
>    Libvirt URI is: qemu+ssh://root@192.168.0.102/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: Cannot recv data: ssh_askpass:
> exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
>    Permission denied, please try again.
>    ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or
> directory
>    Permission denied, please try again.
>    ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or
> directory
>    Permission denied (publickey,password).: Connection reset by peer
> 
> I have installed openssh-askpass on KVM 2 and KVM1 and virsh on KVM2 can
> connect to KVM1:
>    # virsh --connect qemu+ssh://192.168.0.102/system
>    root at 192.168.0.102's password:
>    Welcome to virsh, the virtualization interactive terminal.
>    ...
> 
> 
> Can anyone please advise what I need to do to get virt-manager on KVM2 to
> connect to KVM1.

Hi,

It seems, that virt-manager tries to run openssh-askpass on your Windows PC,
this is probably something, that we should fix in virt-manager.

Try to setup password-less ssh connection from KVM2 to KVM1:

    'ssh-copy-id user at KVM1'

this will copy your public key from KVM2 to KVM1 host and than ssh connection
doesn't require password and therefore it won't try to run the 'ssh-askpass'.

Pavel

> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list




More information about the virt-tools-list mailing list