[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] virt-viewer over ssh

Hi Guys

I've got something interesting and think it's incorrect. List issue here, may be a bug

Description of problem:
  Graphic device listens to different addresses after modifying qemu.conf file.

Version-Release number of selected component (if applicable):

Reproduce steps:
1. Install a guest through virt-manager by following the wizard with default settings.
2. Modify /etc/libvirt/qemu.conf, uncomment vnc_listen = ""
3. service libvirtd restart.
4. virsh destroy $guest.
5. virsh start $guest.
6. Repeat step 4 

Actual results:
1. After step 4, guest listen to
2. After step 5, guest listen to
3. After step 6, guest listen to

Expected results:
1. Guest should keep listening a single address, either or

Additional info:
1. This issue also happens on spice guest.

----- Original Message -----
From: "Daniel P. Berrange" <berrange redhat com>
To: "Dave Allan" <dallan redhat com>
Cc: virt-tools-list redhat com
Sent: Wednesday, November 7, 2012 4:11:10 PM
Subject: Re: [virt-tools-list] virt-viewer over ssh

On Tue, Nov 06, 2012 at 10:42:20PM -0500, Dave Allan wrote:
> On Tue, Nov 06, 2012 at 04:14:43PM -0500, Dave Allan wrote:
> > On Tue, Nov 06, 2012 at 08:11:07PM +0100, Guido G√ľnther wrote:
> > > On Tue, Nov 06, 2012 at 09:56:19AM -0500, Dave Allan wrote:
> > > > I'm having trouble with virt-viewer not connecting to a VM on a remote
> > > > host over SSH.  It connects, briefly gives me a black VM display, and
> > > > then says that the remote disconnected.  I've noticed a few paches on
> > > 
> > > That was basically what I was seeing IIRC. I've roled my patches into
> > > the Debian package:
> > > 
> > > 	http://packages.debian.org/experimental/virt-viewer
> > > 
> > > (in case you have a vm around to test). I didn't get around to dig
> > > deeper into Christophe comments due to a lack of free time yet though.
> > > Cheers, 
> > >  -- Guido
> > 
> > I made some progress understanding what's happening, at least on my
> > system.  Bisecting shows commit
> > 56b0217c626349748c5cc6f2fbccfa6a905f75a4 to be the point at which
> > virt-viewer stops connecting to my VM.  After looking at that commit,
> > I was able to get virt-viewer to connect by adding listen='localhost'
> > to my VM's graphics element.  I'm afraid I haven't had time today to
> > dig into exactly what the effect of that patch is so I can't propose
> > an alternative.
> I think I see what's happening:
> In the default qemu.conf VNC is configured to listen on
> When virt-viewer finds no listen address in the domain xml it
> substitutes the hostname from the connect URI and tries to use nc to
> connect to it, but in the default configuration the guest isn't
> listening on that IP, it's only listening on so the
> connection fails.  Either specifying a listen address or changing
> qemu.conf to allow the guest to listen on will allow
> connections to succeed.
> The problem is tricky since I don't see how the client can determine,
> in the absence of a listen tag in the graphics element, what IP the
> guest is actually listening on.  However, the default qemu.conf
> specifies localhost, so it seems to me that the behavior prior to the
> change in 56b0217 was more likely to be correct as it matches the
> server default.
> At this point, I favor reverting 56b0217, but I'm curious to see
> what other people think.

You're only considering the case where virt-viewer is using SSH and
thus local to the VM. In the non-SSH case, virt-viewer is connecting
to a remote host IP directly and thus 'localhost' is absolutely wrong.

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

virt-tools-list mailing list
virt-tools-list redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]