VNC Console using our own portal

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 14 07:44:10 CEST 2023


Hi,

Am 13/04/2023 um 15:06 schrieb Mark Schouten:
> Not sure if this thread should exist on this list, if not, let me know and I’ll repost to pve-users. However, I think there are more people here that know how to achieve what I’m looking for. :)

That's fine here too.

> We’re building a portal for our VPS services and so far we’ve been happy users of the PVE API. However, we’re now trying to make the Console available, and that seems to be quite difficult. As far as I can see, it’s not documented either, so I’m kinda stuck reverse engineering all this.
> 
> So far I’ve found out that I can just proxy /novnc/ to the relevant cluster to get the HTML/CSS/JS in my browser. But to get VNC working, I need to:
> 1: Start the vncproxy using POST /api2/json/nodes/{node}/qemu/{vmid}/vncproxy
> 2: Use that output to create a new request
> 
> But what should that new request be? And do I need API-Auth keys as well, or is the ticket created by the API call enough? Should I add all the data as HTTP headers, or can I put them in the url parameters?

You'll need to use the information you get from the first API call to pass
along to noVNC, which then uses that to open a websocket connection.

> 
> Have I missed documentation on how to set this up?

No, we have no explicit (developer) documentation for that, but besides our
open source code there are a few forum threads about this, e.g. a recent one:

https://forum.proxmox.com/threads/no-ticket-error-even-with-the-ticket-in-api2-json-nodes-pve-qemu-100-vncwebsocket.123530/

Wile chunked into multiple posts it contains a lot of relevant info for how
this works and what one needs to do.

- Thomas





More information about the pve-devel mailing list