Migrate SolusVM container from a slave to a master
For manual instructions on how to copy a container from one node to another see How to duplicate an OpenVZ SolusVM container then migrate it to a different node
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 solusvm container 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 dedicated server 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.
How was this article? – Migrate SolusVM container from slave to master.