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

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

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.


> Dave
> > > review that seem to reference misbehavior with SSH.[1][2]  Before I go
> > > dig into this, is anybody else seeing this behavior?  Guido, what was
> > > your motivation for these patches?  I have to admit that in the quick
> > > look I took last night I don't understand their purpose.
> > > 
> > > Dave
> > > 
> > > 
> > > [1]
> > > http://www.redhat.com/archives/virt-tools-list/2012-October/msg00223.html
> > > [2]
> > > http://www.redhat.com/archives/virt-tools-list/2012-October/msg00222.html
> > > 

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