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?