Create VM via API not per node but per cluster?

Numma

New Member
Oct 21, 2026
2
0
1
Munich Germany
Hello everybody,

taking a look at the foreman proxmox fog plugin for creating VMs I noticed I have to select a node to create a VM. From the Vsphere Plugin I am used to selecting a cluster and the cluster will decide which esx node has suitable resources to host the new VM.

It's not possible in the pve api to create a VM without determining the node via parameter, is it? Here I found a call including the node:

https://forum.proxmox.com/threads/how-to-create-a-vm-with-proxmox-api.144071/#post-648090

Best wishes
 
For what it's worth, any API under /nodes/<node> should also accept 'localhost' as the node parameter, this simply chooses the node you are currently connecting to. Not sure if this helps in your case, but I thought it would be well worth mentioning.

Cheers!