How To Change Proxmox Container ID?

Stop the container:

`pct stop `

Back up the container:

`vzdump –dumpdir /var/lib/vz/dump`

Create a new container with the desired ID:

`pct create `

If using an existing container filesystem, rename the container config:

`mv /etc/pve/lxc/.conf /etc/pve/lxc/.conf`

Rename the container root filesystem directory if applicable:

`mv /var/lib/lxc/ /var/lib/lxc/`

Rename the container mountpoint if using ZFS or LVM-thin:

`zfs rename /subvol--disk-0 /subvol--disk-0`

`lvrename vm--disk-0 vm--disk-0`

Update the config file references:

`nano /etc/pve/lxc/.conf`

Start the container:

`pct start `

Verify the new ID:

`pct list`

If the container has backups, snapshots, firewall rules, or external references, update them to use the new ID

Suggested for You

Trending Today