Wednesday 27 May 2015

Openvz live migration

This is a quick and easy guide to moving OpenVZ virtual servers around your SolusVM cluster:


1.Run the following code on the node that hosts the container you want to migrate:

wget http://files.soluslabs.com/solusvm/scripts/keyput.sh chmod a+x keyput.sh ./keyput.sh destination_node_ip destination_node_port
  • <destination_node_ip> should be replaced with the IP address of the node you want to migrate the virtual server to
  • <destination_node_port> should be replaced with the SSH port of the node you want to migrate the virtual server to
2. Find the container ID (CTID) of the VPS you want to move and start the migration using vzmigrate:
vzmigrate -v --ssh="-p destination_node_port" destination_node_ip container_id
3.  Update your SolusVM Master when the restore is complete so it knows where the VPS has been moved to. Run the following on your SolusVM Master:

/scripts/vm-migrate [VSERVERID] [NEWNODEID]
 
For example:

/scripts/vm-migrate 150 4
 
 

No comments:

Post a Comment