noVNC console from external site via api? (PVE 5.0-32)

Boomstam

Active Member
Nov 25, 2016
4
0
41
41
What is the correct way to create a console session from a external (web) host to a Proxmox node?

I tried to create a socket and post the ticket with vncwebsocket. All I get is a 401 ticket error.

$action = $proxmox->create("/nodes/mynode/qemu/201/vncproxy");

$vncwebsocket = $proxmox->get("nodes/mynode/qemu/201/vncwebsocket", array('port' => $action['data']['port'], 'vncticket' => $action['data']['ticket']));

<iframe src="nolink://mykvmurl:8006/?console=kvm&novnc=1&vmid=201&node=mynode" frameborder="0" scrolling="no" width="1024px" height="768px"></iframe>

The strange thing is, when I log in to my Proxmox control panel, the noVNC screen starts to work and all seems fine. Cookie problem? When I log out, I get the same 401 no ticket error.

I really want to implement Proxmox for my business, but I don't want clients have to login to the Proxmox CP just to see their VM.

Your help is greatly appreciated!

PS: this is a code example from github.com/ZzAntares/ProxmoxVE 2.1.1 version without guzzle (I am working with PHP 7.0)
PS2: nolink for spam measures

Kind regards,

Martin
 
You might be able to get your own ticket from /access/ticket.
 
I am getting a ticket access via /access/ticket. And I know that I can use any user(@pam or @pve).

Can someone confirm that it is technically possible to VNC from the outside to a Proxmox VM?