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

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 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.


"So the vnc is listening on"

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

  • Mea culpa! I tunneled to the wrong adress. I should have tunneled to not It works now.
    – kangcz
    Aug 10 '11 at 11:17
  • Good deal... Glad it worked out.
    – user48838
    Aug 10 '11 at 12:34

Use Xming and SSH with putty using X forwarding. Then on the server, run vncviewer, 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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