PVE API2: determine node of a vm

argonius

Renowned Member
Jan 17, 2012
48
1
71
Hi,

is it possible to get the actual node in a cluster, on which a vm is running, if I only know the vmid? so for example something like this:

$PVE->get_node('101);

and it will returns the node name on which the vm is running on?

this would be really helpfull...


thanks,
patrick
 
there is just one little question: /cluster/resources uses GET
so if i use $PVE->get i can not pass argument like type = vm....
on pvesh it works fine but how to use it in api?? i've also tried POST but does not work.

how to give the parameter type via api?

thanks,
patrick
 

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!