Is relying on nextid for vmid via API safe?

ameir

New Member
Mar 19, 2014
7
0
1
Via the API, there doesn't appear to be a way to create a container without specifying the vmid. To get the vmid, I would do GET /api2/json/cluster/nextid. My concern with this approach is that in a situation where there are multiple people requesting resources at the same time, the same vmid could be requested. I know that the first person wins, and that subsequent create requests with the same vmid will fail, but is there a way to avoid that altogether? What workarounds are available for this situation, if any?

Thanks!
 
Hello ameir, seems that there i a bug on proxmox related to cluster/nextid in PVE 4.1.
How did you managed this?
 

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!