OpenVZ: Performing a manual migration using prlctl

As a node administrator, it may be necessary for you to migrate VPS' to another physical node.

This short guide is intended for administrators of OpenVZ 7 VPS Nodes that use prlctl.

Quite simply, run the following command, ideally, in a Linux screen session:

prlctl migrate fc70d533-91d5-4216-9637-e43bdef2c3b0 root@192.168.1.1 --clone --ssh "-p 22"


You would want to replace fc70d533-91d5-4216-9637-e43bdef2c3b0 with the container ID, 192.168.1.1 with the destination node IP, and 22 with the destination node SSH port, if not 22.

A successful migration would look something like this:

[root@sabar ~]# prlctl migrate fc70d533-91d5-4216-9637-e43bdef2c3b0 root@192.168.1.1 --clone --ssh "-p 22"
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Migrate the CT fc70d533-91d5-4216-9637-e43bdef2c3b0 on 192.168.1.1 ()
root@192.168.1.1's password:
Checking preconditions
Copying static data

The CT has been successfully migrated.
[root@sabar ~]#


You're done!

We included the --clone flag in order to retain the VPS on the source node, which will allow you to double-check that the migration completed successfully. Once you are happy it has done so, you can remove the source node VPS at your leisure, using prlctl delete.

Was this answer helpful? 0 Users Found This Useful (0 Votes)