Snappy

Helpdesk Support

Official Supportmonk Company Blog!

Changing container ID in Openvz servers

June 9, 2017 , 11:51 am


I was migrating one container from machine to another and accidentally i found that there are two similar container ID on the two machines e.g. 101 on both machines. Migration does not allow migrating a container if the same ID on the other machine exists.

I followed the steps below to change CTID from 101 to 102:


root@host# vzctl chkpnt 101 –dumpfile /tmp/Dump.101
root@host# mv /etc/vz/conf/101.conf /etc/vz/conf/102.conf
root@host# mv /vz/private/101 /vz/private/102
root@host# mv /vz/root/101 /vz/root/102
root@host# vzctl restore 102 –dumpfile /tmp/Dump.101

 

That’s all, now I’ve changed the container ID of VM from 101 to 102.

Outsourced Customer Support