I'm developing a customer facing admin panel application that talks to Proxmox in the background and I need to be able to open a noVNC window from there. Through various tutorials and forum posts, I was able to put together a URL that should open the console however it always ends with a 401: No Ticket error.
This is the C# code I'm using to generate that URL (using this library: https://github.com/Corsinvest/cv4pve-api-dotnet)
Any idea what I'm doing wrong?
https://<pve-ip>:8006/?console=kvm&novnc=1&node=hetz&resize=1&vmid=101&path=api2/json/nodes/<nodename>/qemu/101/vncwebsocket/port/5900/vncticket/PVEVNC%3a64B15391[...]
This is the C# code I'm using to generate that URL (using this library: https://github.com/Corsinvest/cv4pve-api-dotnet)
Code:
var vnc = await _client.Nodes[node].Qemu[vmid].Vncproxy.Vncproxy();
var dic = vnc.ResponseToDictionary;
var data = dic["data"] as IDictionary<string, object>;
var ticket = HttpUtility.UrlEncode(data["ticket"] as string);
var port = int.Parse(data["port"] as string);
await _client.Nodes[node].Qemu[vmid].Vncwebsocket.Vncwebsocket(port, ticket);
var sb = new StringBuilder();
sb.Append("https://<pve-ip>:8006/");
sb.Append("?console=kvm&novnc=1");
sb.Append($"&node={node}");
sb.Append("&resize=1");
sb.Append($"&vmid={vmid}");
sb.Append($"&path=api2/json/nodes/{node}/qemu/{vmid}/vncwebsocket/port/{port}/vncticket/{ticket}");
return sb.ToString();
Any idea what I'm doing wrong?