I've a headless CentOS6 running KVM and I want to configure a guest via vnc. The problem is my working machine is Win7.

I created a guest using command:

sudo virt-install --name=c6-64 --disk path=/var/lib/libvirt/images/c6-64,size=8 --vnc --vcpus=1 --ram=1024 --cdrom=/tmp/CentOS-6.0-x86_64-bin-DVD1.iso --os-type=linux --os-variant=rhel6

So the vnc is listening on 127.0.0.1:5900.

No I want to connect to the vnc from Win7 machine. I tunnel 5900 from localhost to the server using putty, ssh connection is successful. However, when I try to connect using ultravnc or realvnc connection gets refused and in /var/log/secure on the server I can only see:

error: connect_to 10.0.0.2 port 5900: failed.

Can someone please tell me what am I doing wrong? I just need to connect to the guests without installing vnc server inside them and only ssh access is not sufficient (windows guests too).

Thank you for any idea.

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

"So the vnc is listening on 127.0.0.1:5900"

The vnc should probably be listening on the IP of the headless Cent host.

link|improve this answer
Mea culpa! I tunneled to the wrong adress. I should have tunneled to 127.0.0.1:5900 not 10.0.0.2:5900. It works now. – kangcz Aug 10 '11 at 11:17
Good deal... Glad it worked out. – user48838 Aug 10 '11 at 12:34
feedback

Use Xming and SSH with putty using X forwarding. Then on the server, run vncviewer 127.0.0.1:5900, and it will forward that to your Windows 7 machine and give you a VNC window.

That way, you don't have to forward multiple ports for multiple VMs, since the VNC client will be running on the server.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.