OpenVZ Forum


Home » General » Support » Change container ID on the fly?
Change container ID on the fly? [message #28962] Wed, 02 April 2008 14:53 Go to next message
shuaib85 is currently offline  shuaib85
Messages: 59
Registered: September 2007
Member
Dear folks

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.

Just wondering about how to change the container that on the fly if possible. If not what are the other solutions?

Thanks


WebVZ: OpenVZ Web Management Tool
http://webvz.sourceforge.net
Re: Change container ID on the fly? [message #29069 is a reply to message #28962] Fri, 04 April 2008 10:55 Go to previous message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Hello,

You can checkpoint your container and after that restore it on the same node with another ID.

Here is an example how to change CTID from 101 to 102:
    host# vzctl chkpnt 101 --dumpfile /tmp/Dump.101
    host# mv /etc/vz/conf/101.conf /etc/vz/conf/102.conf
    host# mv /vz/private/101 /vz/private/102
    host# mv /vz/root/101 /vz/root/102
    host# vzctl restore 102 --dumpfile /tmp/Dump.101

If you have some action scripts for this container, then you will need to rename them too.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: vzmigrate - keep source online and set destination offline
Next Topic: OpenVPN template or help needed
Goto Forum:
  


Current Time: Sat Jul 13 21:53:10 GMT 2024

Total time taken to generate the page: 0.02284 seconds