How to perform live migration of KVM VPS in SolusVM?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to perform a live migration of KVM VPS in SolusVM?

Answer

In the current implementation, SolusVM does not support live migration.
Please, vote for this feature on our user-voice portal:
https://solus.uservoice.com/forums/914134-help-us-improve-solus/suggestions/36987493-live-migration-for-kvm-vpses

Below is a possible workaround.

Warning: try the instruction on test VPS first

There are several requirements that should be met:

  • Volume Group on destination node should have the same name as on Source node.
  • Desitination node hostname should resolve to Destination node IP address from Source node.
    It can be done by adding the corresponding record in /etc/hosts on the Source node. For example, there is a Destination node with the hostname destination.example.com and with IP 10.10.10.10. In this case,  add the following line in /etc/hosts on Source node:

    CONFIG_TEXT: 10.10.10.10 destination.example.com

Follow the below steps to perform a live migration of the VPS

Note: kvm101 is pointed as an example, replace it with the actual VPS

  1. Connect to Source node via SSH
  2. Fetch the name of the migrated VPS storage(LVM) and find out its size:

    # virsh domblklist kvm101 | grep hda | awk {'print $2'}
    /dev/solusvm/kvm101_img

    # lvs | grep kvm101 | awk {'print $4'}
    20.00g

  3. Connect to the Destination node via SSH
  4. Create logical volume according to the information from step 2:

    # lvcreate -n kvm101_img -L 20G solusvm

  5. Connect to the Source node via SSH
  6. Migrate the VPS with the command:

    # virsh migrate --live kvm101 qemu+ssh://{Destination_IP}/system

    Replace {Destination_IP} with the Destination node's IP address

  7. Connect to Master node via SSH
  8. Update Master node database with the new location of VPS:

    # /scripts/vm-migrate ID NEWNODEID

    where ID - ID of the migrated VPS, can be seen in column ID in SolusVM > Virtual Servers;

    NEWNODEID - ID of the target node, can be seen in SolusVM > Nodes.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.