How to manually migrate SolusVM Xen PV VPS to another node?

Applicable to:

  • SolusVM

Question

How to manually migrate SolusVM Xen PV VPS to another node?

Answer

  1. Connect to Source Xen node via SSH

  2. Find path to logical volume of VPS as well as its size:

    # lvs | grep VMID
    VMID_img solusvm -wi-ao---- 20.00g
    VMID_swap solusvm -wi-ao---- 256.00m

    VMID of VPS can be found in SolusVM > Virtual Servers > VMID column.

    How to find VMID

    VMIDXEN.PNG

    In this particular example path to logical volume is /dev/solusvm/VMID_img.

  3. Create a copy of the logical volume of the VPS:

    # dd if=/dev/solusvm/VMID_img | gzip | dd of=/home/VMID_backup.gz bs=4096

  4. Connect to destination node over SSH.

  5. Create logical volumes for VPS and Swap with same sizes as on source node:

    The required volume group can be found with command vgs:

    # vgs
    VG #PV #LV #SN Attr VSize VFree
    solusvm 1 4 0 wz--n- <79.97g 53.84g

    # lvcreate -n VMID_img --size 20G solusvm
    # lvcreate -n VMID_swap --size 256M solusvm 

  6. Transfer copy of LVM:

    # scp -r root@source_ip:/home/VMID_backup.gz /home/

  7. Restore the copy:

    # dd if=/home/VMID_img of=/dev/solusvm/VMID_img

  8. Connect to SolusVM Master node over SSH and update SolusVM Master with the new location:

    # /scripts/vm-migrate ID NODEID

    where
    ID - ID of the VPS in Virtual Servers> ID column.

    Where to find ID of VPS

    XenID.PNG

    NODEID - ID of the node in Nodes > ID column.

    Where to find NODEID

    NODEIDPNG.PNG

  9. Reboot VPS in Virtual Servers > VPS > Reboot.

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.