3

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.

kangcz
  • 33
  • 1
  • 3

2 Answers2

1

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

user48838
  • 7,431
  • 2
  • 18
  • 14
1

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.

BigChief
  • 398
  • 1
  • 2
  • 12