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.
 

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!