Proxmox - Locked VM ID
If you cannot deply VMs on specific vmid's you may need to clean up old orphaned links.
Notes
Typically, you will need to investigate accross the entire cluster to find where the orphaned links still exist.
Replace <VMID> with the problem VM id
You can use oxide -p '<YOUR COMMAND>' to execute these accross the cluster. BE MINDFUL**
Config files
Search for locked config files (on all cluster nodes)
If any are found DOUBLE CHECK that the VMID is not listed in the UI. If it is not meant to be there you can delete it with
Logical Volumes (LVM)
There may be some orphaned logical volume references to the disks.
If there is any output, it will contain something likevm-<VMID>-disk-0 (please make a note of this You can now use this output to remove the lvs volume/s on any nodes where it exists.
You will need the volume group's name, where the logical volume resides next.
You can now remove the volume with
Device Mapper
There may be orphaned references to the volume in the device mapper conf.
If there is any output, take a note of it <MAPPER_NAME>, as it will need to be remove from the dm config.
Notes
If none of this works, you can ask ChatGPT or Google or something....