External VNC in proxmox 2

Tony

Renowned Member
Nov 4, 2010
113
10
83
Hello,

I am trying to enable external vnc following this guide: http://pve.proxmox.com/wiki/Vnc_2.0

However I cannot connect; the vnc client (JollysFastVNC) says "connection closed" immediately. When I telnet to the vnc port, it says:

Escape character is '^]'.
unable to connect to socket '/var/run/qemu-server/999.vnc' - No such file or directory at /usr/sbin/qm line 53.
Connection closed by foreign host.

and indeed the file doesn't exist on the host:


ls /var/run/qemu-server

999.pid 999.qmp

when I check using ps on host, the kvm command is following:

/usr/bin/kvm -id 999 -chardev socket,id=qmp,path=/var/run/qemu-server/999.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/999.vnc,x509,password -pidfile /var/run/qemu-server/999.pid -daemonize -name template-ubuntu-12.04 -smp sockets=1,cores=1 -cpu host -nodefaults -boot menu=on -vga cirrus -k en-us -m 512 -vnc 0.0.0.0:9001,password -usbdevice tablet -drive file=/var/lib/vz/template/iso/ubuntu-12.04.1-server-i386.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/dev/vg-drbd/vm-999-disk-1,if=none,id=drive-virtio0,cache=none,aio=native -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -netdev type=tap,id=net0,ifname=tap999i0,script=/var/lib/qemu-server/pve-bridge,vhost=on -device virtio-net-pci,mac=5E:70:DA:7C:8E:44,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300


the relevant line in /etc/inetd.conf is:
9001 stream tcp nowait root /usr/sbin/qm qm vncproxy 999

and 999.conf is:

bootdisk: virtio0
cores: 1
cpu: host
ide2: local:iso/ubuntu-12.04.1-server-i386.iso,media=cdrom,size=688428K
memory: 512
name: template-ubuntu-12.04
net0: virtio=5E:70:DA:7C:8E:44,bridge=vmbr0
ostype: l26
sockets: 1
virtio0: shared-storage-on-drbd:vm-999-disk-1,cache=none,size=20G
args: -vnc 0.0.0.0:9001,password

I tried both with and without password in 999.conf, but it doesn't make any difference.

Also tried to say 3101 (ie 9001 - 5900) as in the guide, but could not start the VM:

qm start 999
Failed to start VNC server on `0.0.0.0:3101'

I also tried the web console, and got the error "Network error: could not connect to server: localhost:5900"

Can someone please give a hint what to try?

Edit: I forgot to mention that I connect to the proxmox GUI through ssh tunnel, since this host is hosted at an external hosting company and the only mean to connect to the host is via ssh; other protocols/ports are blocked by firewall.

Edit2: some more info: when I run in host terminal:

/bin/nc -l -p 9002 -w 1000 -c '/usr/sbin/qm vncproxy 999'

and then connect to port 9002 using a vnc client, I got this error in the host terminal:
unable to connect to socket '/var/run/qemu-server/999.vnc' - No such file or directory at /usr/sbin/qm line 53.

it seems the problem is that the vnc socket somehow is not created...

thanks,
Tony
 
Last edited:
i have the same issues... exactly

anyone know how to fix it?

thanks. gabriel
 
the following works for me:

- do not use inetd at all
- in eg /etc/pve/local/qemu-server/100.conf: add this line:

args: -vnc 127.0.0.1:3100

- how to connect:
# on node:
qm start 100

# on my laptop:
ssh -L 30100:localhost:9000 node-IP

# start TigerVNC, connect to localhost:30100
 
Hi,

You have followed two different setup instructions!

using the 'args:' in the .conf file is for use with old external VNC clients (ipad, realvnc, others) and only uses password if set

using the inetd is for use with tigerVNC, and webconsole only! as it uses the new x509 SSL encryption

use one or the other, not both at the same time as it wont work as i found out :(

Simon
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!