📚 Legacy Documentation
Notice: This is the legacy documentation. For the latest features and updates, refer to our current SolusVM documentation.
For KVM VPS
The following should be performed to manually migrate KVM VPS from one node to another:
Stop the required VPS in SolusVM > Virtual Servers > VPS > Shutdown. Note VMID of VPS, for example, it is kvm101
Connect to the source slave node over SSH.
Find a logical volume of the VPS:
# lvdisplay | grep "LV Path" | grep "kvm101" LV Path /dev/yourvg/kvm101_imgCreate a copy of the logical volume:
# dd if=/dev/yourvg/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096Transfer the copy to the target slave node, for example using the following command on the source node:
# scp -C /home/kvm101_backup.gz root@targetserverip:/home/Connect to the target server over SSH.
Create a logical volume with the same size and name:
# lvcreate -n kvm101_img --size 10G /dev/yourvgRestore the copy to the created logical volume:
# dd if=/home/kvm101_backup.gz | gzip -d | dd of=/dev/yourvg/kvm101_img bs=4096Connect to your Master node over SSH
Update Master node database with the new location of VPS
# /scripts/vm-migrate ID NEWNODEIDWhere ID - ID of the migrated VPS, can be seen in column ID inSolusVM > Virtual Servers; NEWNODEID - ID of the target node, canbe seen in SolusVM > Nodes.
For example:# /scripts/vm-migrate 20 5Reboot VPS via SolusVM > Virtual Server > migrated VPS > Reboot for changes to take effect and verify that it is working.
After verifying correct work of VPS - remove logical volume and the VPS directory on the source server:
# lvremove /dev/yourvg/kvm101_img # rm -rf /home/kvm/kvm101/