Change VPS ID

+1 for this suggestion. because changing ID is now very painful with method backup / restore with other ID
 
based on the VMID, also directories and disks get their names. if you change just the VMID, you break this easy system.

so its not really possible.
 
I think it is not very hard to make function (also available in GUI) which will rename all necesary configs, files and folders. This can reduce downtime to only few minutes but if you make offline backup and restore downtime can took hours based on amount of data. Please think about it and not reject it now.
 
I think it is not very hard to make function (also available in GUI) which will rename all necesary configs, files and folders.

This is not really easy, because:

1.) such action need to be atomic, but rename can fail
2.) some storage types dose not support rename

but I will keep that in mind.
 
While Proxmox still not yet support VPS ID changing then I use Virt Clone for workaround

The "Virt Clone" tool (virt-clone for short command name, virtinst for package name) is a command line tool for cloning existing inactive guests. It copies the disk images, and defines a config with new name, UUID and MAC address pointing to the copied disks.
 
Last edited:
I am not a developer or contributor for Promox, but I believe I understand the reason
behind VMID and would like to share...

VMID is like primary key in database. It must be unique per cluster (singleton).
Because so many things rely on this number changing this is both tedious and dangerous.

However I understand the need of having a 'name' or 'title' related to the VM / CT.

IMHO a better recommendation is to add name / title in addition to VMID instead of making it editable.
 
Would be even better to not use ID#'s at all. When working on the box seeing config files or dirs, instead of "116" I could see its "CustomerX" and know what Im dealing with.

Is there any special reason they're numbers instead of words/tags? Is there any way they could be alphanumeric tags instead of numbers?
 
VMID is like primary key in database. It must be unique per cluster (singleton).
Because so many things rely on this number changing this is both tedious and dangerous.
You right, that's why Change VMID is important feature for Clustering.

Support you have Node1 and Node2, unfortunately both nodes have SAME VMID 100! To make them Clustered you need to change:
a. Node1 -- VMID 100
b. Node2 -- VMID 100 -- change to 101. Now the Clustering works!

I have try to change VMID manually and really easy (but MANUALLY):
a. Stop VM 100
b. Rename /vz/images/100 to /vz/images/101
c. # mv /etc/pve/qemu-server/100.conf /etc/pve/qemu-server/101.conf
d. # nano /etc/pve/qemu-server/101.conf change folder 100 to 101
e. Start VM

Edit: But I don't know why Proxmox 3.3 not yet give us this important feature, so we can easier make Cluster of EXISTING nodes!
 
Last edited:
  • Like
Reactions: Amin Vakil
IMHO a better recommendation is to add name / title in addition to VMID instead of making it editable.
This makes a lot of sense to me. And to avoid a collision between two VMID's, make them UUID's. It's not sexy, but solves the problem.

Code:
vzctl enter 66b026a3-8d75-46e0-9564-279878059e79
root@66b026a3-8d75-46e0-9564-279878059e79#> _
:)
 
Last edited:

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!