Virtual Machine Manager can't conect to host.

Dear all,

I have setup one server with opensuse leap 42.1.

Right now it is going to run level 5 with XFCE.

With YAST I’ve installed KVM server and KVM tools.

On the server I can use the Virtual Machine Manager.

I have one desktop with opensuse leap 42.1 and if I try to connect to the server with Virtual Machine Manager I get the following error:

Unable to connect to libvirt.


Cannot recv data: No protocol specified
QXcbConnection: Could not connect to display :0
Host key verification failed.: Connection reset by peer


Verify that the 'libvirtd' daemon is running
on the remote host.
Unable to connect to libvirt.


Cannot recv data: No protocol specified
QXcbConnection: Could not connect to display :0
Host key verification failed.: Connection reset by peer


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


Libvirt URI is: qemu+ssh://root@192.168.10.107/system


Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 865, 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: Cannot recv data: No protocol specified
QXcbConnection: Could not connect to display :0
Host key verification failed.: Connection reset by peer

I can connect to the servidor through ssh.

On the servidor:

~>systemctl status libvirtd.service
libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
   Active: active (running) since Dom 2016-10-09 14:40:20 WEST; 1h 57min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 1769 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           \u2514\u25001769 /usr/sbin/libvirtd --listen



I think the problem is

Could not connect to display :0

but don’t know how to solve it.

Thanks.

Hi
Connect to the remote system over ssh on virt-manager and setup your ssh keys from the host your connecting to on the server.

On the conections settings of virt-manager I have “Method: SSH”

Hi
If you don’t use ssh keys, does it connect via password?

No.

The errors in my first post is with ssh connection.

I’ve also instaled x2go on the server and if I try to connect using “connect to local desktop” I get

Connection failed. No protocol specified xwininfo: error: unable to open display ":0" ... 

That is why I think the problem is in the display seetings.

Hi
That’s a localhost issue, not the remote. How are you starting the local virt-manager?

Solved!

I reinstaled virt-manager on the desktop pc.

virt-manager is not in the kde menu. I’m starting it from console.