Articles in this section

How to migrate the KVM VMs manually?

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:

  1. Stop the required VPS in SolusVM > Virtual Servers > VPS > Shutdown. Note VMID of VPS, for example, it is kvm101

  2. Connect to the source slave node over SSH.

  3. Find a logical volume of the VPS:

# lvdisplay | grep "LV Path" | grep "kvm101"
LV Path /dev/yourvg/kvm101_img

  1. Create a copy of the logical volume:

# dd if=/dev/yourvg/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096

  1. 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/

  1. Connect to the target server over SSH.

  2. Create an empty VPS on the destination node via SolusVM UI with the same settings and resources and stop it.

  3. 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

  1. After verifying the correct work of VPS - remove the logical volume on the source server:

# lvremove /dev/yourvg/kvm101_img

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.