7.1.1. Migrating Containers from OpenVZ Based on Kernels 2.6.18 and 2.6.32 to Virtuozzo 7

You can migrate containers from a server running OpenVZ based on kernels 2.6.18 and 2.6.32 to a Virtuozzo 7 server by means of the ovztransfer.sh script freely available at https://src.openvz.org/scm/ovzl/ovztransfer.git. Do the following:

  1. Install the SSH key on the destination server for the root user. To do this, on the source server generate a key with ssh-keygen -t rsa, then transfer the key to the destination server with ssh-copy-id root@<dest_server>.
  2. Clone the repository with the script to the source OpenVZ server with git clone https://src.openvz.org/scm/ovzl/ovztransfer.git.
  3. Change to the /ovztransfer directory and make the script executable with chmod 755 ovztransfer.sh.
  4. Run the script on the source OpenVZ server as follows:

    # ./ovztransfer.sh <dest_server> <source_CT1_ID>[:<new_CT1_name>]\
    [ ... <source_CTn_ID>[:<new_CTn_name>]]

    where <source_CT_ID> (the source container ID) and <new_CT_name> (the new container name) must both be specified in the old numerical ID format. For example:

    # ./ovztransfer.sh 192.168.0.10 100:200

    So, in the example above, 200 will be the name of the resulting ploop-based container on the Virtuozzo 7 server, even though said name looks like an old numerical ID.