Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Migrating OpenVZ Virtual Servers from one Hardware Node to another  (Read 2845 times)

0 Members and 1 Guest are viewing this topic.

Leo.Prince

  • Guest
Hi,

Migrating an openvz container is very easy and simple. It doesn't causes any downtime as it is known for it's live migration. Here are the steps to follow for live migration

On the node where the virtual servers already exists, run:

Code: [Select]
# wget http://files.soluslabs.com/solusvm/scripts/keyput.sh

# chmod a+x keyput.sh

# ./keyput.sh <DN_ip> <DN_port>

DN_ip & DN_port = the ip and ssh port of the node you want to transfer the VPS to.(Destination_node)

This is to make sure that both the hardware nodes are accessible via ssh keys.

Next, we need to know the ID of the VPS which is to be transfered, for that, run this on the server that contains the VPS,

Code: [Select]
vzlist -a
Code: [Select]
# vzmigrate -v --ssh="-p <DN_port>" <DN_ip> <VPS_id>
That is all what needed. Once this is completed, Your VM will be running from the other H/W node. Make sure that these nodes are comes under same DC and network to preserve the IPs along with it.

Thank you.