Unable to connect to libvirt. (xubuntu)

6,175

Solution 1

Just install ssh-askpass

sudo apt-get install ssh-askpass

(x)Ubuntu Installations seems to misses that package.

Solution 2

After this is the second time this comes up I tried to reproduce it today. You already posted the answer how to install askpass (thanks), but for the other issue which was already marked a dup - here some details about it.

I installed two Ubuntu systems and set up a user ubuntu@... that can be logged in via ssh keys. One of them had libvirtd and one had virt-manager. It worked right away.

Since you mentioned askpass I removed the ability to login via keys and require a password. But in that case the error message for me seems quite clear. It directly calls for ssh-askpass in the error.

enter image description here

You can - as you did - install askpass, or as I outlined before set up ssh-keys - in both cases it then works fine.

Is that maybe a rather old version of virt-manager? I tried virt-manager in Xenial, Bionic, Cosmic and Disco which all worked quite similar for me.

If all of that doesn't help your case, please outline whatever is special on your user setup as it might be related.

Share:
6,175

Related videos on Youtube

sneaky
Author by

sneaky

Updated on September 18, 2022

Comments

  • sneaky
    sneaky almost 2 years

    Error message while opening VMM:

    Unable to connect to libvirt. You need to install openssh-askpass or similar to connect to this host.

  • Christian Ehrhardt
    Christian Ehrhardt over 5 years
    That would still be a missing dependency, at least a recommends I'd say. @sneaky What exactly do you mean when you say "opening VMM" starting virt-manager? I'd ask you to file a bug for the package that has this to add a dependency which should help to avoid the issue for other users.
  • sneaky
    sneaky over 5 years
    Well, at least this error message is more exact than the other message I get on another machine (and it can be solved the same way): [Unable to connect to libvirt qemu+ssh] (askubuntu.com/questions/1129190/…)
  • sneaky
    sneaky over 5 years
    Unable to connect to libvirt qemu+ssh://UserName@IpOfServer:Port/system. Cannot recv data: Der Wert ist zu groß für den definierten Datentyp Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 1036, in _do_open self._backend.open(self._do_creds_password) File "/usr/share/virt-manager/virtinst/connection.py", line 144, in open open_flags) File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: Cannot recv data:
  • sneaky
    sneaky over 5 years
    Well, I used the version installed by repo on Xubuntu 18.04. The version is 1.5.1. I know, that there is a version 2.1, but which version do you use?
  • Christian Ehrhardt
    Christian Ehrhardt over 5 years
    @sneaky - as stated above my tests covered all of these versions - I really wonder what is odd with your setup.