Proxmox5 VNC

Aleksej

Well-Known Member
Feb 25, 2018
62
4
48
38
Hi all.
I can't configure vnc.
I tried to use openbsd-inetd with adding line like
Code:
20510 stream tcp nowait root /usr/sbin/qm qm vncproxy 105 MyPass
but via telnet i have a result "400 to many arguments". in case without pass the result is "RFB 003.008" and waiting for something. Via remmina it asks for CA cert. Via vncviewer it tells like "is that RFB server?"

The second i tried was adding
Code:
args: -vnc 0.0.0.0:100,password
in vm conf file. But in monitor (Web interface) command "change vnc password Mypass" not working and "set_password vnc mypass" also not working. This way is not really good for me because i need fixed pass to access vnc after restart.

Maybe someone can help?

i found interesting command in https://forum.proxmox.com/threads/external-vnc-viewer.612/#post-2747 and thought that
Code:
vncterm -c qm vncproxy 105
will work, but there is the same thing as with inetd.

Please, help.
 
Last edited:
qm vncproxy is more of an internal command (which changes the password of the vnc server in qemu and redirects to stdin/out)

if you want a plain vnc port open for a vm you have to use the api call

e.g.

pvesh create /nodes/NODENAME/qemu/VMID/vncproxy

this returns the port, and with a valid pve login (e.g. root@pam and the root password) you can login
alternatively you can add '-websocket' to the call
then the password is the ticket it returns

so you have to:

1. call the vncproxy (with or without websocket parameter)
2. parse the output (for the port and ticket)
3. use that info to connect to with a vncclient

note that with the websocket parameter the connection is not encrypted (on the webgui this happens via ssl and websockets)
and for the non websocket call your vnc client has to support vencrypt
 
after call
Code:
pvesh create /nodes/1/qemu/1/pveproxy
or with -websocket option there is json string with port 5900 returned, but server is not listening on 5900.
i tried to use
Code:
pvesh create /nodes/1/qemu/1/monitor -command='change vnc 0.0.0.0:100,password'
the result is 200 OK,
but next
Code:
pvesh create /nodes/1/qemu/1/monitor -command='set_password vnc mypass'
results with "... to use passwords set -vnc {},password..."
if i add "args: -vnc 0.0.0.0:100,password" to config the result of above command "monitor -'set_password vnc mypass' is 200 OK, but no results. password is not set.

"pveproxy' can't use static pass. i wanted to use own password.

maybe someone have an idea?
 
results with "... to use passwords set -vnc {},password..."
this should already work, and it works here

if i add "args: -vnc 0.0.0.0:100,password" to config the result of above command "monitor -'set_password vnc mypass' is 200 OK, but no results. password is not set.
probably because there are then multiple vnc servers open and it sets the 'wrong' one

or with -websocket option there is json string with port 5900 returned, but server is not listening on 5900.
this works here, but it only listens on the port for 10 seconds, then it closes it if no connection is made (to prevent leaving open vnc ports)