How to Re-number an OpenVZ Container from one CTID to another

- 27 Apr 2010

Poor planning: I guess I am guilty. A few times I have needed to re-number an OpenVZ Container. You just need to know what your current CTID is (sourcecid) and your desired target CTID (targetcid).

Here are the steps:

sourcecid=100
targetcid=101
vzctl chkpnt ${sourcecid} --dumpfile /tmp/openvz-renumber-dump.${sourcecid}
mv /etc/vz/conf/${sourcecid}.conf /etc/vz/conf/${targetcid}.conf
mv /vz/private/${sourcecid} /vz/private/${targetcid}
mv /vz/root/${sourcecid} /vz/root/${targetcid}
vzctl restore ${targetcid} --dumpfile /tmp/openvz-renumber-dump.${sourcecid}


Related Posts: Extracting Smarty variables from source » Installing vzdump on CentOS 5.4 (32-bit) » Dumping Addresses from phplist » Adding NRPE (Nagios) to CentOS \/ RHEL Servers » Adding the REMI Repository to CentOS / RHEL / RedHat »

comments powered by Disqus