Block a user
Install and setup dev env
The environment setup is an lxc container using ubuntu 22.04. Git, nodejs, and npm packages are installed via apt. npm init was run. npm install express --save was run.
Find the api route to reset vms.
From the aforementioned page:
HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/status/reboot
Reboot the VM by shutting it down, and starting it again. Applies pending changes.
Required…
Step 4 would be to take a JSON file as the configuration. Stuff like proxmox API key and a map of names to VM IDs
Step 3 would be a simple HTML page to display the button
Step two, use express js to make a API route that takes the ID and runs the function
Step one, write a fun function in node that takes a VM is and API and resets that VM