NoVNC access to VM or containers

tootai

New Member
Nov 23, 2023
4
0
1
Hi,

using API I'm able to get all the stuff done like

> GET /api2/json/nodes/pve/qemu/100/vncwebsocket?port=5900&vncticket=PVEVNC%3a65609AFD%3a%3agwyNlgcUgpihXZH1UL7aE%2fQIcqEaAjBchw4T1h6U7ZnlF4XkbKGmvrPe7Z3ga6K3Vdb%2brrX6wMxdUUwO9b7xpQRGdxAy4X%2flk9DHORp52G%2b2LGJIstKmloOjlvKeBUCMiqp71W6czkpHpHRdQgQlFATWvqNm5Cz9%2fPHeCBX865FwlXd7iRbxTMnuY2p7d7DeX3Rx59%2f2ViGq5JAvJ%2fMYlfrZC0tKOBOZPHqX4d%2fmBPrXHx8kw5drGp4rNzMmlIAsRNy5jJDpaOAhqHLeToj2JEyu0w9XfcBuKGryKPzGjCr3233%2fLUrvypn6lMQgploBXJPJFW88sJ%2bfFtR2i6Xa%2bw== HTTP/1.1
> Host: proxmox.example.com:8006
> User-Agent: curl/7.81.0
> Accept: */*
> Cookie: PVEAuthCookie=PVE:root@pam:656A01A2::g5MJaQXKUI83rCLY2jh53znpKLG8/CJmHg2v/RPYbNs+a9lKOd60Jgv8KaVPdV5pJ+Zut53h2/8em/2VdYcFrYxR4kjf1zwvN6e2C0LQaKzU5q/OgQzzYK52nvvo5cn8FMWgYWqS/bsip2Eya8qqi5Y9QP+Dp7fDiMEMBwSbes4pflZZ4OtNSTT7UsCVrjthYO9oNjpWRhQ8XLhKDKhtmXh/kUedrvNUdcohDwi1rC/QAsxbPH2Mn/iXWnPLTfWkjYNy1iNqZ78YpW6ksqjKB3c4aNhyCd2LgV9u4ptYVe1ISnrgQFu6MWrVJT4B/nkOtcq4LyJobsjo0NufzwdY7Q==
> CSRFPreventionToken: 656A01A2:M3JTDePTdUj1bmbuXOuuGnyRmPqsmc+3GKXG09Xj4vM

which end up with

* Connection #0 to host proxmox.example.com left intact
{"data":{"port":"5900"}}

From now, how to launch firefox to open a console using novnc ? If it matter I get it work with novnc console from Hetzner using URL https://novnc.com/noVNC/vnc.html

Other question: is it possible through API to start/stop/reboot/have status/... of VMs or containers (not using qm or pct or pvesh)

Thanks for your support

Daniel
 
Everything that is written here in the forum about the VNC proxy is very unclear.

The fact is that with vncwebsocket only a forwarding header is "activated".

This means that the PVECookie must be included... But no 0815 user should receive it, that's why I simply wrote a reverse proxy in Java...

Vanilla VNC Server <--> WebSocket Server <--> NoVNC.
 

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!