In this tutorial I will show you, how to migrate SolusVM VPS from Slave to Master.
You can use the inbuilt function in SolusVM to migrate SolusVM containers between slave nodes but, what if you want to move containers from a slave node to a master node? There is currently no option to do this from the SolusVM admin control panel.
You can however use a console to migrate the containers to a master. It’s worth noting that you can run a SolusVM master on a vps server but if you do you can’t then host containers on the master. You cannot run a slave node on a vps.
To start login to the node which has the container you want to migrate to your master on. You need to login as the root user or a user that has root privileges
Issue the below command
wget http://files.soluslabs.com/solusvm/scripts/keyput.sh chmod a+x keyput.sh
Now find the ip address of your master node and the ssh port, we use a custom port so just swap the ip and port as below
./keyput.sh MASTER_IP SSH_PORT
./keyput.sh 192.168.2.1 5874
Now you have a secure connection to your master you can then transfer the container to the node. Get the container ID (CTID) and master ip address. You can get the CTID from the “list servers” tab
vzmigrate -v --ssh="-p destination_node_port" destination_node_ip container_id
vzmigrate -v --ssh="-p 5876" 192.168.2.2 384
Once complete your container will then be on the master. Click the transfer is 100% complete but leave the container on the source node in case of any problems.
The final thing to do is assign any new ip addresses to the container, remember if you can’t route your old main ip address to your master you will need to assign the container a new main ip address from the control panel. Don’t forget to tell the master the new location of the container. Login to your master node and update the containers location with this command
/scripts/vm-migrate [VSERVERID] [NEWNODEID]
/scripts/vm-migrate 724 1
You can get the node id from the “nodes” tab in the admin area once complete your container should now be located on your master node.
Was this Tutorial helpful? Help others share on Facebook, Twitter, and Google Plus!