Hello, I would like to share with you a problem that I could not find the answer to, but I solved. I hope it helps someone.
I have developed an application with Laravel so that my clients can manage virtual machines and I don't want to share the proxmox node ip information.I followed the following way for console connection to my customers.
Step 1. I set up one ubuntu 22 virtual server
Step 2 I installed novnc on the ubuntu server by running the command sudo apt-get install novnc on the server.
Step 3. I started listening on a port by starting a websockify with the following command on the ubuntu server.
Step 4 Then I made a request to the following endpoint through my application.
parameters : ['websocket' => 1,'generate-password' => 1]
Step 5 : proxmox will keep the connection open for a short time. That's why we need to quickly establish the connection.
Here we send the port and password information returned from API to novnc in iframe.
echo '<iframe src=x.x.x.x:'.[vncproxy-port].'/vnc.html?password='.urlencode(['vncproxy-password']).'&autoconnect=true&resize=scale" width="100%" height="100%">';
If you make an iframe connection to the server you have installed, you will see that the console connection is provided.
You can start websockify daemons with an algorithm according to your cluster and node number.
remember, when you set up your ubuntu server and start websockify deam, you should see the novnc screen when you open http://x.x.x.x:5900. Don't go to the next step without catching this.
In this way, I was able to open more than one cluster and more than one node to the management of my customers on the software I designed and arranged the console connections by providing authorization.
I hope this information is useful to someone.
I have developed an application with Laravel so that my clients can manage virtual machines and I don't want to share the proxmox node ip information.I followed the following way for console connection to my customers.
Step 1. I set up one ubuntu 22 virtual server
Step 2 I installed novnc on the ubuntu server by running the command sudo apt-get install novnc on the server.
Step 3. I started listening on a port by starting a websockify with the following command on the ubuntu server.
Code:
websockify -D --web=/usr/share/novnc/ 5900 x.x.x.x:5900
Step 4 Then I made a request to the following endpoint through my application.
Code:
/api2/json/nodes/{node}/qemu/{vmid}/vncproxy
parameters : ['websocket' => 1,'generate-password' => 1]
Step 5 : proxmox will keep the connection open for a short time. That's why we need to quickly establish the connection.
Here we send the port and password information returned from API to novnc in iframe.
echo '<iframe src=x.x.x.x:'.[vncproxy-port].'/vnc.html?password='.urlencode(['vncproxy-password']).'&autoconnect=true&resize=scale" width="100%" height="100%">';
If you make an iframe connection to the server you have installed, you will see that the console connection is provided.
You can start websockify daemons with an algorithm according to your cluster and node number.
remember, when you set up your ubuntu server and start websockify deam, you should see the novnc screen when you open http://x.x.x.x:5900. Don't go to the next step without catching this.
In this way, I was able to open more than one cluster and more than one node to the management of my customers on the software I designed and arranged the console connections by providing authorization.
I hope this information is useful to someone.