Migrate a VM to a different region

To migrate a VM to a different region we can create an Image from it’s main bootable volume (usually mounted on /dev/vda) on the source region and use that Image to instantiate a new VM on the destination region.

In this example we will migrate a VM named test1 from the garr-ct1 region to garr-pa1 region.

  1. From the top navigation bar select garr-ct1

    ../../_images/mig0.png
  2. Navigate to Compute/Instances and select test1. On the overview page you can visualize the VM metadata, note down the following info

    • Name - test1

    • Flavor - c1.small

    • Networks - default

    • Security Groups - default, http and http

    • Metadata Key Name - avram

    ../../_images/mig1.png
  3. Navigate to Volumes/Volumes and find your VM’s volumes. Look up the Attached to field it contains the VM-name and the mountpoint. The volume mounted on /dev/vda is usually the volume where the operating system is stored. In our case we have the following

    • 4cfa41a6-0104-4012-8db3-185bc7d81ed9 - /dev/vda on test1

    • test1_VDB_volume - /dev/vdb on test1

    • test1_VDC_volume - /dev/vdc on test1

    ../../_images/mig2.png
  4. For each volume X repeat the following steps:

    • from dropdown select Upload to image

    • name the new image test1_VDX_image, check Force and leave Disk Format to RAW.

    • click on Upload to create the new image

    • wait until the Upload process is completed

    ../../_images/mig3.png ../../_images/mig4.png ../../_images/mig5.png
  5. From the top navigation bar select garr-pa1

    ../../_images/mig6.png
  6. On the garr-pa1 region recreate Network/Security Groups, Network/Networks, Network/Routers and Network/Load Balancers with the same settings as on garr-ct1 region.

    ../../_images/mig7.png
  7. Navigate to Compute/Images you should find the following images

    • test1_VDA_image

    • test1_VDB_image

    • test1_VDC_image

    ../../_images/mig8.png
  8. Find the main image test1_VDA_image (the one that has the operating system) select Launch and use the info from step2 to create a new VM test1.

    ../../_images/mig9.png ../../_images/mig10.png ../../_images/mig11.png ../../_images/mig12.png ../../_images/mig13.png ../../_images/mig14.png
  9. Find the secondary volume images - test1_VDB_image and test2_VDB_image. For each image select Create Volume. Name the volumes test1_VDB_volume and test1_VDC_volume.

    ../../_images/mig15.png ../../_images/mig16.png
  10. Navigate to Compute/Instances and check if the VM was created successfully. From the dropdown select Attach Volume. Attach one volume at a time in the following order.

    ../../_images/mig17.png ../../_images/mig18.png ../../_images/mig19.png
  11. From the dropdown on the right select Attach Interface. Attach one network interface at a time. In our case the only network used is “default” so you can skip this step

    ../../_images/mig20.png ../../_images/mig21.png
  12. From the dropdown on the right select Associate Floating IP to add a floating IP.

    ../../_images/mig22.png