Unable to retrieve next free vmid: 500 Internal Server Error: unable to get any free VMID in range [999991, 1000000]

fadeway

New Member
Oct 30, 2024
5
0
1
Hi,

I have an ansible job which deploys 4 VMs. Each deploy starts by getting the next available vmid from the API. After getting one or two vmids, the API refuses to provide any more with the message "Unable to retrieve next free vmid: 500 Internal Server Error: unable to get any free VMID in range [999991, 1000000]".

How can I change this range? It makes no sense to me that proxmox is defaulting to such a narrow range of IDs.

Details:

When I manually test the API on my proxmox host I get a very high vmid:
Code:
curl -s -k -H 'Authorization: PVEAPIToken=root@pam!ci_cd=horsebatterystaple' 'https://proxmox.example.org:8006/api2/json/cluster/nextid'
{"data":"999999"}

This host has only ~10 VMs on it. For example here is the storage we always use:
Code:
ll /mnt/pve/nac1.svm_pve_eimfstest_ssd/images/
total 48K
drwxr-xr-x 12 nobody nogroup 4.0K Nov  4 08:08 ./
drwxr-xr-x  5 nobody nogroup 4.0K Sep 12 11:18 ../
drwxr-----  2 nobody nogroup 4.0K Sep 17 09:16 122011/
drwxr-----  2 nobody nogroup 4.0K Oct 23 08:48 122401/
drwxr-----  2 nobody nogroup 4.0K Oct 21 11:58 300/
drwxr-xr-x  2 nobody nogroup 4.0K Oct 23 08:41 301/
drwxr-xr-x  2 nobody nogroup 4.0K Nov  1 12:08 888/
drwxr-----  2 nobody nogroup 4.0K Oct 28 11:44 999991/
drwxr-----  2 nobody nogroup 4.0K Oct 28 11:44 999992/
drwxr-----  2 nobody nogroup 4.0K Oct 28 11:45 999993/
drwxr-----  2 nobody nogroup 4.0K Oct 28 11:45 999994/
drwxr-----  2 nobody nogroup 4.0K Nov  4 08:08 999996/
 
Hi @fadeway ,
Proxmox, by default, does not enforce this range. Someone in your organization set the range.
Look at "datacenter.cfg" file for details:

Code:
cat /etc/pve/datacenter.cfg
keyboard: en-us
mac_prefix: BC:24:14
next-id: lower=9000

You can actuate the range via GUI in datacenter options.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: fadeway

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!