Johannes Kastl
2014-Mar-27 11:19 UTC
[libvirt-users] Using qemu+ssh on openSUSE 13.1/Tumbleweed
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everyone, I am trying to get libvirt with qemu-kvm to work on my machines running openSUSE 13.1 / Tumbleweed. My question is in regard to using qemu+ssh, which would be my preference, as I already have a working ssh-key authentication with SSH-Agent. I set the permissions of the manage-socket to 0770, added my user to the libvirt group and set auth_unix_rw = "none" in /etc/libvirt/libvirtd.conf. I am now able to see all my VMs using virsh list --all (I had to set a default_uri in .config/libvirt/libvirt.conf to get any non-empty output). Trying from another machine (say target hostname is HOSTX, username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system always results in>> error: failed to connect to the hypervisor error: internal error: >> received hangup / error event on socketI see this in /var/log/messages (lines will be wrapped in the mail, sorry):> 2014-03-24T21:25:55.023525+01:00 HOSTX sshd[3509]: Accepted > publickey for testuser from 192.168.79.8 port 54176 ssh2 > 2014-03-24T21:25:55.024744+01:00 HOSTX sshd[3509]: > pam_unix(sshd:session): session opened for user testuser by (uid=0) > 2014-03-24T21:25:55.025717+01:00 HOSTX kernel: [ 3162.225673] > type=1006 audit(1395692755.024:69): pid=3509 uid=0 old > auid=4294967295 new auid=1000 old ses=4294967295 new ses=24 res=1 > 2014-03-24T21:25:55.027501+01:00 HOSTX systemd[1]: Starting Session > 24 of user testuser. 2014-03-24T21:25:55.027918+01:00 HOSTX > systemd-logind[703]: New session 24 of user testuser. > 2014-03-24T21:25:55.028213+01:00 HOSTX systemd[1]: Started Session > 24 of user testuser. 2014-03-24T21:25:55.081719+01:00 HOSTX > sshd[3511]: Received disconnect from 192.168.79.8: 11: disconnected > by user 2014-03-24T21:25:55.082095+01:00 HOSTX sshd[3509]: > pam_unix(sshd:session): session closed for user testuser > 2014-03-24T21:25:55.086268+01:00 HOSTX systemd-logind[703]: Removed > session 24.I am curious about the 'Received disconnect from 192.168.79.8: 11: disconnected by user' thing. How can I fix this? Or how to debug this? How can I get more info from libvirt? /var/log/kvm is an empty directory, /var/log/libvirt/qemu just has logs for the different VMs. I have already tried to get polkit running, although I think it should not be used due to the auth_unix_rw = "none". Any help will be appreciated. Versions: openSUSE TUmbleweed (which is openSUSE 13.1 with some more recent software) qemu-kvm is version 1.7.90-19.1.x86_64 libvirt is 1.1.2 The following packes are installed: libvirt-1.1.2-2.18.3.x86_64 libvirt-client-1.1.2-2.18.3.x86_64 libvirt-daemon-1.1.2-2.18.3.x86_64 libvirt-daemon-config-network-1.1.2-2.18.3.x86_64 libvirt-daemon-config-nwfilter-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-interface-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-libxl-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-lxc-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-network-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-nodedev-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-nwfilter-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-qemu-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-secret-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-storage-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-uml-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-vbox-1.1.2-2.18.3.x86_64 libvirt-daemon-driver-xen-1.1.2-2.18.3.x86_64 libvirt-daemon-lxc-1.1.2-2.18.3.x86_64 libvirt-daemon-qemu-1.1.2-2.18.3.x86_64 libvirt-doc-1.1.2-2.18.3.x86_64 libvirt-glib-1_0-0-0.1.7-2.1.3.x86_64 libvirt-python-1.1.2-2.18.3.x86_64 Regards, Johannes - -- Have you ever noticed that the Klingons are all speaking unix? 'Grep ls awk chmod.'' 'Mknod ksh tar imap.' 'Wall fsck yacc!' (that last is obviously a curse of some sort). Gandalf Parker -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlM0CU8ACgkQzi3gQ/xETbKKyQCfVQ4XviDo5+92ivOIgx4lXIty 980An28BKHjfwZiRh5T2Yyj3wHwOLrYJ =ujio -----END PGP SIGNATURE-----
Johannes Kastl
2014-Mar-27 16:29 UTC
Re: [libvirt-users] Using qemu+ssh on openSUSE 13.1/Tumbleweed
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27.03.2014 12:19 Johannes Kastl wrote:> Trying from another machine (say target hostname is HOSTX, > username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system > always results in >>> error: failed to connect to the hypervisor error: internal >>> error: received hangup / error event on socketI just found out, that using virt-viewer -c qemu+ssh://testusers@HOSTX/system XYZ starts the VM named XYZ and displays the VNC session. So basically it works, but not with virsh itself. Regards, Johannes - -- If atheism is a religion, then bald is a hair colour. (Paul Quirk in alt.atheism.moderated) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlM0UdAACgkQzi3gQ/xETbKIsQCeI1kVjn0uvjYqwd+Od/PBFwmg XrsAn3GLwjTxPagYxI2THoifG6GZ4Hl/ =fyKo -----END PGP SIGNATURE-----
Johannes Kastl
2014-Mar-28 18:49 UTC
Re: [libvirt-users] Using qemu+ssh on openSUSE 13.1/Tumbleweed
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27.03.14 17:29 Johannes Kastl wrote:> So basically it works, but not with virsh itself.Please don't ask me what it was, but now it works. I suddenly got prompted to accept the ssh host key of the target server, and it worked. The only thing I changed was to have a libvirt.conf for the user, to set some aliases and a default uri. Maybe that was it. Strange. Regards, Johannes - -- "And trust no-- Trust practically no-one. All right? Except trustworthy people." (Terry Pratchett: Jingo) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlM1xFQACgkQzi3gQ/xETbLhNQCeIM6WNkb5NftrLFROJVudG725 2pQAn0isZNt/6I9ADkoK5/PW4EoDCrJX =se/X -----END PGP SIGNATURE-----