[virt-tools-list] virt-manager over ssh

Vincenzo Romano vincenzo.romano at notorand.it
Mon Nov 26 12:06:03 UTC 2018


Il giorno lun 26 nov 2018 alle ore 12:19 Vincenzo Romano
<vincenzo.romano at notorand.it> ha scritto:
>
> Hi all.
>
> I am struggling to make virt-manager work over an SSH link.
> The remote host is Ubuntu Server 18.04, running libvirt daemon
> v4.0.0-1ubuntu8.5.
> I have setup and tested an SSH key authentication between local
> machine and the remote host.
> The remote user I am using belongs also to 'kvm' and 'libvirt' groups.
> On the local machine (ArchLinux up-to-date) I have virt-manager v2.0.0
> that works flawlessly while using the local libvirt daemon.
> Whenever I try to open the connection I get this error (copy+pasted
> from the error dialog):
>
> ==== BEGIN ====
> Unable to connect to libvirt qemu+ssh://vmanager@noa.vm1/system.
>
> End of file while reading data: nc: unix connect failed: Permission
> denied: Errore di input/output
>
> Verify that the 'libvirtd' daemon is running on the remote host.
>
> Libvirt URI is: qemu+ssh://vmanager@noa.vm1/system
>
> Traceback (most recent call last):
>   File "/usr/share/virt-manager/virtManager/connection.py", line 1012,
> in _do_open
>     self._backend.open(connectauth.creds_dialog, self)
>   File "/usr/share/virt-manager/virtinst/connection.py", line 138, in open
>     open_flags)
>   File "/usr/lib/python3.7/site-packages/libvirt.py", line 104, in openAuth
>     if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> libvirt.libvirtError: End of file while reading data: nc: unix connect
> failed: Permission denied: Errore di input/output
> ==== BEGIN ====
>
> Of course virt-manager is working and I am missing something important.
> But I have no clue on what I am missing.
>
> Any hint?
>
> Thanks in advance.


I solved the issue by fixing the permissions of the file /dev/kvm.
I set it to "crw-rw---- 1 root kvm" with:
sudo chowm root:kvm /dev/kvm
sudo chmod 660 /dev/kvm

Be warned that the group kvm isn't being created by default Ubuntu
installation (as I've been compiling qemu from sources).


-- 
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS




More information about the virt-tools-list mailing list