I want to use vue novnc to connect the virtual machine created by proxmox

chenym

Member
Oct 25, 2022
50
1
8
I want to use vue novnc to connect the virtual machine created by proxmox. I found the API shown in the figure below, but I don't know how to apply it.
1666839164370.png
 
I use the following API to create a new websocket connection, but the data returns null.
 

Attachments

  • 1666840500059.png
    1666840500059.png
    55.9 KB · Views: 43
Hello, I use APIs to create virtual machines. Do you need to manually go to the PVE server to change the configuration file for each virtual machine?
No, you can set the args parameter via API too (but only as root@pam for security reasons, because it allows passing arbitrary arguments to kvm).
 
不,您也可以通过 API 设置 args 参数(但出于安全原因,只能设置为 root@pam,因为它允许将任意参数传递给 kvm)。
I set args in the configuration file, which is the same as the connection you sent me, but cannot be accessed through ip+port. The result is shown in the following figure.1666856819519.png
 
Is the VM running? You won't be able to access it via a browser, you need a VNC client.
 
Can I use the API to execute this command?View attachment 42766
AFAIK that's not currently possible via API. You could either set up a hook script for the VM and send the QMP commands there or instead, you might need to go for the approach with the vncproxy API endpoint after all.

EDIT: forgot to add the link to the hook script documentation.


EDIT2: see below
 
Last edited:
AFAIK that's not currently possible via API. You could either set up a hook script for the VM and send the QMP commands there or instead, you might need to go for the approach with the vncproxy API endpoint after all.

EDIT: forgot to add the link to the hook script documentation.
I want to send a command to monitor through the API, but it does not work. What is my fault?1667202976181.png
 
I want to send a command to monitor through the API, but it does not work. What is my fault?View attachment 42769
Yes, using the /nodes/<node>/qemu/<ID>/monitor endpoint should work. Do you have the Sys.Modify permission on /? Is the VM running? What error message do you get in the result?
 
Yes, using the /nodes/<node>/qemu/<ID>/monitor endpoint should work. Do you have the Sys.Modify permission on /? Is the VM running? What error message do you get in the result?
Yes, I have sys The modify permission does not take effect when I execute the command to monitor1667203549759.png
 
Is the VM running? What error message do you get in the result of the monitor request?
 
Is the VM running? What error message do you get in the result of the monitor request?
I can use the client to connect to my VNC, but I want to connect to the VNC of proxmox ve through my own VUE web page. What should I do?
 

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!