[CentOS] VNC

Scott Robbins scottro at nyc.rr.com
Sun Oct 20 11:10:43 UTC 2013


On Sat, Oct 19, 2013 at 09:40:13PM -0600, Larry Martell wrote:
> > > > >
> > > > > > I had posted last week about trying to get VNC working. I was never
> > > > > > successful nor were multiple admins. But we realized that all the
> > > > hosts we
> > > > > > tried on were VMs. We followed the same procedure (
> > > > > > http://wiki.centos.org/HowTos/VNC-Server) on a machine with
> > physical
> > > > HW
> > > > > > and it worked with no problem. But on the VM I can connect, but I
> > > > don't get
> > > > > > any window displayed. Here is what is in the log:
> > > > > >

> > > > > Does anyone out there have VNC working on a VM?


> My only access to the host is via ssh so I don't think I can do that.

I haven't followed this thread that closely, so hopefully, I'm not
suggesting something that has already been discarded.

Say the host is called kvmserver and your guest is called kvmguest.  While on there, with ssh session

virsh vncdisplay  kvmguest

It will tell you if its on display 0, 1, 2, or whatever.


Let's say it's on 0.


On your local machine

ssh -L 5900:localhost:5900 kvmhost

Now, if you do vncviewer localhost, it will open up a console on the remote
kvm machine. 

If running virsh vncdisplay kvmguest shows 5901 or 5902, then change the 5900 to
that number, and change vncviewer localhost to vncviewer localhost:1
localhost:2 or whatever.



-- 
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6




More information about the CentOS mailing list