Datacenter/Cluster-aware pct / qm commands

Schiznik

Active Member
Apr 25, 2018
3
0
41
40
I'm trying to script management of VMs and containers with pct & qm in a cluster, however they only seem to be able to manage things running on their own nodes. I mainly want to be able to change config of the VM/LXCs, as ha-manager can start/stop/migrate

I've trawled through the support documentation, but I haven't found anything.. so asking here...

Is it possible to use pct / qm to manage things running on a different host in a cluster? Is there an alternative command that I havent spotted?
 
You can make use of the API, even locally on a PVE node, with the pvesh command.

You can check on which node a guest is on by getting the cluster resources first. For example
Code:
pvesh get cluster/resources --type vm

For more details on the API you can check the API viewer, which is also available locally if you click on Documentation in the GUI (top right).

If you are unsure what API endpoint might be the one you need, do it in the GUI with the browser dev tools open an monitor the network calls.