oneiric's virt-viewer can't connect to console of precise's virtual machines

Bug #989452 reported by Thomas Schweikle
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Expired
Medium
Unassigned
qemu-kvm (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Showstopper: "virt-viewer -c qemu+ssh://<email address hidden>:8022/system vm" starts, but quits immediately. On the client side no error messages are found. On the server sind "2012-04-27 07:07:40.071+0000: 27040: error : virNetSocketReadWire:996 : End of file while reading data: Input/output error".

Same for virt-manager: no connection to consoles of running guests possible.

on server:
ii libvirt-bin 0.9.8-2ubuntu17 programs for the libvirt library
ii libvirt0 0.9.8-2ubuntu17 library for interfacing with different virtualization systems
ii munin-libvirt-plugins 0.0.6-1 Munin plugins using libvirt
ii openvpn 2.2.1-8ubuntu1 virtual private network daemon
ii python-libvirt 0.9.8-2ubuntu17 libvirt Python bindings
ii qemu-kvm 1.0+noroms-0ubuntu13 Full virtualization on i386 and amd64 hardware
ii ubuntu-virt-server 1.3 Common packages necessary for hosting virtual machines

on client:
ii virt-viewer 0.4.1-1ubuntu2 Displaying the graphical console of a virtual machine
ii virt-manager 0.9.0-1ubuntu3 desktop application for managing virtual machines

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libvirt-bin 0.9.8-2ubuntu17
Uname: Linux 3.2.16 x86_64
ApportVersion: 2.0.1-0ubuntu6
Architecture: amd64
Date: Fri Apr 27 09:08:08 2012
InstallationMedia: Ubuntu-Server 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 TERM=screen-bce
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=de_DE.UTF-8
SourcePackage: libvirt
UpgradeStatus: Upgraded to precise on 2012-04-25 (1 days ago)
mtime.conffile..etc.default.libvirt.bin: 2011-01-25T16:19:13
mtime.conffile..etc.libvirt.libvirtd.conf: 2012-04-27T09:03:31.607171
mtime.conffile..etc.libvirt.lxc.conf: 2010-12-31T17:35:32
mtime.conffile..etc.libvirt.qemu.conf: 2012-04-25T12:18:38
mtime.conffile..etc.sasl2.libvirt.conf: 2011-01-26T17:57:00

Revision history for this message
Thomas Schweikle (tps) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for taking the time to report this bug. I'll attempt to reproduce it.

In the meantime, since you are connecting to root@server, have you made sure that you can ssh to root@server? In the past when I've done that, after creating an ssh key and inserting it into root@server's keyring, I had to log in once by hand to get past ssh's server key fingerprint verification.

summary: - virt-viewer can't connect to console of virtual machines
+ oneiric's virt-viewer can't connect to console of precise's virtual
+ machines
Changed in libvirt (Ubuntu):
importance: Undecided → High
Revision history for this message
Thomas Schweikle (tps) wrote :
Download full text (3.3 KiB)

I've set sasl-auth for my servers to make use of sso. As found there are incompatible changes to the sasl-part as found in libvirt and qemu, making it impossible for virt-viewer to connect to vnc-sessions build up by libvirtd. Same applies for virt-manager.

Since it works with libvirtd, kvm-qemu on debian, I suppose it's a bug within libvirtd, kvm-qemu as used with Ubuntu precise.

Switching off sasl auth for vnc is a crude workaround.

Versions found on Ubuntu 12.04:
ii grub-firmware-qemu 1.99-21ubuntu3 GRUB firmware image for QEMU
ii kvm 1:84+dfsg-0ubuntu16+1.0+noroms+0ubuntu13 dummy transitional package from kvm to qemu-kvm
ii kvm-ipxe 1.0.0+git-3.55f6c88-0ubuntu1 PXE ROM's for KVM
ii libvirt-bin 0.9.8-2ubuntu17 programs for the libvirt library
ii libvirt0 0.9.8-2ubuntu17 library for interfacing with different virtualization systems
ii python-libvirt 0.9.8-2ubuntu17 libvirt Python bindings
ii qemu-common 1.0+noroms-0ubuntu13 qemu common functionality (bios, documentation, etc)
ii qemu-kvm 1.0+noroms-0ubuntu13 Full virtualization on i386 and amd64 hardware
ii qemu-utils 1.0+noroms-0ubuntu13 qemu utilities
ii ubuntu-virt-server 1.3 Common packages necessary for hosting virtual machines
ii virt-top 1.0.6-1 show stats of virtualized domains
ii virt-what 1.11-1 detect if we are running in a virtual machine
ii virtinst 0.600.1-1ubuntu3 Programs to create and clone virtual machines

Versions found on Debian (testing):
ii ipxe-qemu 1.0.0+git-20120202.f6840ba-3 PXE boot firmware - ROM images for qemu
ii kvm 1:1.0+dfsg-11 dummy transitional package from kvm to qemu-kvm
ii libvirt-bin 0.9.11-2 programs for the libvirt library
ii libvirt0 0.9.11-2 library for interfacing with different virtualization systems
ii qemu 1.0.1+dfsg-1 fast processor emulator
ii qemu-keymaps 1.0.1+dfsg-1 QEMU keyboard maps
ii qemu-kvm 1.0+dfsg-11 Full virtualization on x86 hardware
ii qemu-system 1.0.1+dfsg-1 QEMU full system emulation binaries
ii qemu-user 1.0.1+dfsg-1 QEMU user mode emulation binaries
ii qemu-user-static 1.0.1+dfsg-1 QEMU user mode emulation binaries (static version)
ii qemu-utils 1.0.1+dfsg-...

Read more...

Revision history for this message
Thomas Schweikle (tps) wrote :

> In the meantime, since you are connecting to root@server,
> have you made sure that you can ssh to root@server? In
> the past when I've done that, after creating an ssh key
> and inserting it into root@server's keyring, I had to log in
> once by hand to get past ssh's server key fingerprint verification.

This is a known problem with qemu+ssh. The dialog asking to accept the key pops up, but regardless you click "OK" or "Decline" the key will not be accepted. To solve it you'll have to connect once using plain ssh from commandline. Or set ssh to accept any new key and write it out to ".ssh/known_hosts" ...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(marking as affecting qemu-kvm; lowering priority per guidelines as there is a less-than-desirable workaround)

Changed in libvirt (Ubuntu):
status: New → Confirmed
Changed in qemu-kvm (Ubuntu):
importance: Undecided → Medium
Changed in libvirt (Ubuntu):
importance: High → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Ntaflos (daff) wrote :

There are currently multiple bugs that deal with virt-manager/virt-viewer not being able to connect to a VNC console of a Libvirt/KVM domain, such as #837275, #995320 and this one.

The problem remains, however. On a Precise server (12.04.1) where /etc/libvirt/qemu.conf has set

vnc_listen = "0.0.0.0"
vnc_tls = 0

no VNC connection is possible with neither virt-manager, nor virt-viewer from a remote client. Virt-manager just displays the dreaded "Error: viewer connection to hypervisor host got refused or disconnected!" and virt-viewer says "Unable to connect to the graphic server 0:5916" when called like this:

virt-viewer -c qemu+tcp://kvmhost04/system domain01.example.com

Libvirt is configured to allow unencrypted TCP connections (because of bug #1001798) so regular virt-manager interaction works, just not the VNC console.

This must be a virt-manager, Libvirt or QEMU issue, because using a VNC viewer like xtightvncviewer to connect to the domain's VNC port works fine:

xtightvncviewer kvmhost04:5916

So what can we do? I see no interesting log entries anywhere that would begin to explain what is going on here.

Revision history for this message
Andreas Ntaflos (daff) wrote :

Addendum: All this with Precise machines (client and server), no Oneiric or earlier involved.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Andreas,

would it be possible for you to test with quantal machines?

Revision history for this message
Andreas Ntaflos (daff) wrote :

Serge, at the moment it is a bit difficult but in a few weeks I could have some spare machines available on which I could install Quantal.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 989452] Re: oneiric's virt-viewer can't connect to console of precise's virtual machines

Quoting Andreas Ntaflos (<email address hidden>):
> Serge, at the moment it is a bit difficult but in a few weeks I could
> have some spare machines available on which I could install Quantal.

Thanks. I hope to strenuously re-test this myself in the next few
days.

Revision history for this message
Chris J Arges (arges) wrote :

Please verify with the latest version, I was unable to reproduce this issue. Thanks

Changed in libvirt (Ubuntu):
status: Confirmed → Incomplete
Changed in qemu-kvm (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for qemu-kvm (Ubuntu) because there has been no activity for 60 days.]

Changed in qemu-kvm (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.