Applicable to:
- SolusVM
Question
How to migrate the KVM VMs manually?
Answer
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_img
- Create a copy of the logical volume:
# dd if=/dev/yourvg/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096
- Transfer 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 an empty VPS on the destination node via SolusVM UI with the same settings and resources and stop it.
-
Restore the copy to the image of the new VPS:
# dd if=/home/kvm101_backup.gz | gzip -d | dd of=/dev/yourvg/kvm101_img bs=4096
- After verifying the correct work of VPS - remove the logical volume on the source server:
# lvremove /dev/yourvg/kvm101_img
Comments
Please sign in to leave a comment.