Describe the bug
I have a project that creates a bunch of VMs (kubernetes cluster with 7 nodes).
This project uses default provider config (I assume default is random_vm_id = false).
I have:
VMs with IDs 100-106
107 - is free
108 - used by a template VM
109-115 used by VMs and templates.
When I try to provision this cluster from scratch I get error:
vm with ID 107 is created
21:50:23.663 STDOUT terraform: │ Error: unable to retrieve the next available VM identifier: All attempts fail:
21:50:23.663 STDOUT terraform: │ #1: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #2: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #3: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #4: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #5: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #6: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #7: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #8: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #9: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
21:50:23.663 STDOUT terraform: │ #10: error retrieving next VM ID: received an HTTP 400 response - Reason: Parameter verification failed. (vmid: VM 108 already exists)
**To Reproduce**
Steps to reproduce the behavior:
1. Create VMs and VM templates with some IDs
2. Try to provision few VMs with this provider
3. See error
**Expected behavior**
When random_vm_id=false (or unset) I would like to have the old behaviour from version <= 0.65.0
- Single or clustered Proxmox: single node
- Proxmox version: 8.2.7
- Provider version (ideally it should be the latest version): 0.66.0
- Terraform/OpenTofu version: terraform 1.9.5 + terragrunt v0.67.4
- OS (where you run Terraform/OpenTofu from): Macos Seqoia
- Debug logs (`TF_LOG=DEBUG terraform apply`): with TF_LOG=DEBUG it seems to work properly. Maybe there is some kind of race condition when provisioning multiple VMs in parallel.
Describe the bug I have a project that creates a bunch of VMs (kubernetes cluster with 7 nodes). This project uses default provider config (I assume default is random_vm_id = false). I have:
When I try to provision this cluster from scratch I get error: