Hello, i need to move some LXC vm between hosts but the destination host have already some vm with same IDs..... somebody know how to change the lxc vm ids ?
Thanks
I know it's an old topic but this could help someone :
EXAMPLE : rename an LXC container from 100 to 101
1- Be sure there are NO VM with the target id (here 101)
2- Please be CARREFUL, be sure you know what you are doing and check every line and name that it is correct (do not use the names in my example)
3- Stop the container
4- Open host shell
5- Rename the disks :
and so on for each disk
6- Edit the configuration file in /etc/pve/lxc/100.conf to correct the disks names (eg 100 to 101)
7- Rename the configuration file :
Code:
mv /etc/pve/lxc/100.conf /etc/pve/lxc/101.conf
8- Go to the web UI, the change should be seen soon
Tested on PVE 5.4
Also consider that I have not tested with a VM that has snapshots for replication, but I GUESS it only needs to rename the disks AND snapshots on all the nodes involved, then edit the configuration file in /etc/pve/replication.cfg.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.