13.1 -> 13.2 upgrade broke connection to remote VM server

In 13.1, I could use virt-manager to connect via ssh to a remote OpenSUSE 13.1 system to run VMs. I just upgraded my laptop to 13.2, while the VM server is still running 13.1.

First, the upgrade caused my configuration for the remote system to disappear, which I find odd.

Second, after the upgrade to 13.2, virt-manager can no longer connect to the VM server. It dies with the “useful” message:
Error polling connection ‘qemu+ssh://ingham@clarke.i-pi.com/system’: An error occurred, but the cause is unknown

I am using ssh public key authentication, and the agent has my key, so I can ssh to the server without having to enter a password. Once on the server, I can start virt-manager as me and work with VMs. This means that it should not be a permission problem.

How do I get this working again?

Kenneth

uname -a

Linux socrates.i-pi.com 3.16.6-2-desktop #1 SMP PREEMPT Mon Oct 20 13:47:22 UTC 2014 (feb42ea) x86_64 x86_64 x86_64 GNU/Linux

rpm -qa | egrep -i ‘kvm|qemu|virt’ | sort

libvirt-1.2.9-1.3.x86_64
libvirt-client-1.2.9-1.3.x86_64
libvirt-daemon-1.2.9-1.3.x86_64
libvirt-daemon-config-network-1.2.9-1.3.x86_64
libvirt-daemon-config-nwfilter-1.2.9-1.3.x86_64
libvirt-daemon-driver-interface-1.2.9-1.3.x86_64
libvirt-daemon-driver-libxl-1.2.9-1.3.x86_64
libvirt-daemon-driver-lxc-1.2.9-1.3.x86_64
libvirt-daemon-driver-network-1.2.9-1.3.x86_64
libvirt-daemon-driver-nodedev-1.2.9-1.3.x86_64
libvirt-daemon-driver-nwfilter-1.2.9-1.3.x86_64
libvirt-daemon-driver-qemu-1.2.9-1.3.x86_64
libvirt-daemon-driver-secret-1.2.9-1.3.x86_64
libvirt-daemon-driver-storage-1.2.9-1.3.x86_64
libvirt-daemon-driver-uml-1.2.9-1.3.x86_64
libvirt-daemon-driver-vbox-1.2.9-1.3.x86_64
libvirt-daemon-driver-xen-1.2.9-1.3.x86_64
libvirt-daemon-qemu-1.2.9-1.3.x86_64
libvirt-glib-1_0-0-0.1.9-2.1.4.x86_64
libvirt-python-1.2.9-1.2.x86_64
patterns-openSUSE-kvm_server-20141007-2.1.x86_64
python-virtualbox-4.3.18-1.6.x86_64
qemu-2.1.0-2.9.x86_64
qemu-block-curl-2.1.0-2.9.x86_64
qemu-ipxe-1.0.0-2.9.noarch
qemu-ksm-2.1.0-2.9.x86_64
qemu-kvm-2.1.0-2.9.x86_64
qemu-seabios-1.7.5-2.9.noarch
qemu-sgabios-8-2.9.noarch
qemu-tools-2.1.0-2.9.x86_64
qemu-vgabios-1.7.5-2.9.noarch
qemu-x86-2.1.0-2.9.x86_64
virt-install-1.0.1-14.4.1.noarch
virt-manager-1.0.1-14.4.1.noarch
virt-manager-common-1.0.1-14.4.1.noarch
virtualbox-4.3.18-1.6.x86_64
virt-utils-1.1.9-11.1.2.x86_64
virt-viewer-1.0-2.1.4.x86_64

Additional information that might be useful. I see a bunch of sshs hanging around.

2875 ? S 0:00 ssh -l ingham clarke.i-pi.com sh -c ‘if ‘nc’ -q 2>&1 | grep “requires an argument” >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;‘nc’ $ARG -U /var/run/libvirt/libvirt-sock’
3000 ? S 0:00 ssh -l ingham clarke.i-pi.com sh -c ‘if ‘nc’ -q 2>&1 | grep “requires an argument” >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;‘nc’ $ARG -U /var/run/libvirt/libvirt-sock’
3271 ? S 0:00 ssh -l ingham clarke.i-pi.com sh -c ‘if ‘nc’ -q 2>&1 | grep “requires an argument” >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;‘nc’ $ARG -U /var/run/libvirt/libvirt-sock’
3285 ? S 0:00 ssh -l ingham clarke.i-pi.com sh -c ‘if ‘nc’ -q 2>&1 | grep “requires an argument” >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;‘nc’ $ARG -U /var/run/libvirt/libvirt-sock’
3289 ? S 0:00 ssh -l ingham clarke.i-pi.com sh -c ‘if ‘nc’ -q 2>&1 | grep “requires an argument” >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;‘nc’ $ARG -U /var/run/libvirt/libvirt-sock’

Maybe a bit late, but who knows… :wink:

I have 12.3 running on my VM-server (13.2 on my work-station).

First, the upgrade caused my configuration for the remote system to disappear, which I find odd.

Yes, happened to me too. The new virt-manager (1.0.1, old was 0.9.5) stores its configuration a bit differently (new: ~/.config/dconf/user vs. old: ~/.config/gconf/apps/virt-manager/).

Second, after the upgrade to 13.2, virt-manager can no longer connect to the VM server. It dies with the “useful” message:
Error polling connection ‘qemu+ssh://ingham@clarke.i-pi.com/system’: An error occurred, but the cause is unknown

I have no problem with virt-manager or virsh connecting remotely.

The error message is from a command executed via the ssh-tunnel which virt-manager set up. The text “requires an argument” (from one of your other posts) appears in /usr/share/virt-manager/virtManager/console.py on line 261

Maybe there is something in virt-manager’s logs (~/.cache/virt-manager/virt-manager.log).

Also see libvirtd’s logs on the VM-server if you have access (probably /var/log/messages).

There are logging options in /etc/libvirt/libvirtd.conf (on the VM-server; backup before you change!)

I am using ssh public key authentication, and the agent has my key, so I can ssh to the server without having to enter a password. Once on the server, I can start virt-manager as me and work with VMs. This means that it should not be a permission problem.

You might want to try this:

virsh --connect=qemu+ssh://ingham@clarke.i-pi.com/system list

If you get an error with this command: virsh has a --debug option, see man virsh.

List of my installed packages on the VM-server with 12.3:

# rpm -qa | egrep -i 'kvm|qemu|virt' | sort
kvm-1.3.1-3.6.2.x86_64
libvirt-1.0.2-1.22.1.x86_64
libvirt-client-1.0.2-1.22.1.x86_64
libvirt-python-1.0.2-1.22.1.x86_64
python-virtinst-0.600.3-2.2.1.x86_64
qemu-1.3.1-3.8.1.x86_64
qemu-linux-user-1.3.1-3.8.1.x86_64
qemu-tools-1.3.1-3.8.1.x86_64
virt-utils-1.1.9-6.1.1.x86_64

List of my installed packages on my work-station with 13.2:

# rpm -qa | egrep -i 'kvm|qemu|virt' | sort
libvirt-client-1.2.9-1.3.x86_64
libvirt-glib-1_0-0-0.1.9-2.1.4.x86_64
libvirt-login-shell-1.2.9-1.3.x86_64
libvirt-python-1.2.9-1.2.x86_64
qemu-block-curl-2.1.0-2.9.x86_64
qemu-linux-user-2.1.0-2.9.x86_64
qemu-tools-2.1.0-2.9.x86_64
typelib-1_0-LibvirtGLib-1_0-0.1.9-2.1.4.x86_64
virt-install-1.0.1-14.7.1.noarch
virt-manager-1.0.1-14.7.1.noarch
virt-manager-common-1.0.1-14.7.1.noarch
virt-viewer-1.0-2.1.4.x86_64

You do not have qemu-linux-user and libvirt-login-shell, but after reading their rpm-descriptions I doubt if installing them would be the solution. Not having virt-install is probably not an issue.

You probably do not need this, but, in case somebody is wondering, my permissions:

--- /etc/libvirt/libvirtd.conf.orig       2013-03-20 17:03:53.055466005 +0100
+++ /etc/libvirt/libvirtd.conf       2014-10-06 11:26:57.000000000 +0200
@@ -81 +81 @@
-#unix_sock_group = "libvirt"
+unix_sock_group = "libvirt"
@@ -98 +98 @@
-#unix_sock_rw_perms = "0770"
+unix_sock_rw_perms = "0770"
@@ -129 +129 @@
-#auth_unix_ro = "none"
+auth_unix_ro = "polkit"
@@ -138 +138 @@
-#auth_unix_rw = "none"
+auth_unix_rw = "none"

(This is a diff-file which can be fed to patch (backup first)).

The ssh-user is a member of the libvirt group (ingham in this post).

Kind regards,

Leen