How to Move VMs to a New or Different Account in CloudStack

As a leading CloudStack solutions company, we often get questions about how to perform certain tasks within the interface. We wanted to take this as an opportunity to answer one of the most frequently asked questions about migration. Today, we are going to outline the step-by-step process of how to move virtual machines to a new or different account within Apache CloudStack or Citrix CloudPlatform 4.2 or below. If you happen to have CloudStack or Citrix CloudPlatform 4.2.1 or above, there is a new feature that automates this process for you. 

Before proceeding remember that this is a manual process and should be performed by a cloud administrator. This process will also take some time, possibly even hours depending on the size of your volume and network speeds, so we advise that you don't start unless you have several hours.

Process within the Old Account

  1. Start by logging into the cloud console of the old account

  2. Next stop the virtual machine you want to migrate

  3. Select the Volumes tab

  4. Take a snapshot of the root drive of the instance you would like to move

  5. Create a template from the fresh snapshot of the virtual machine and name it something unique so you can easily identify it when you decide to migrate it.

*At this time you must decide if you can risk having that template temporarily available to others inside your cloud environment. If not please proceed  with step 6. If you do not mind having your template temporarily available to others and are copying to another account in the same Domain please proceed to step 6A.

  1. Next click download template and copy the URL

    1. Mark your template as featured or public and ignore step 2 of the next block of instructions. Your template will already be there among the featured or community templates depending on which you selected.

  2. Log out of the old account

Process within the New Account

  1. Start by logging into the account that you wish to move the virtual machine to

  2. Upload the template using the copied URL

  3. Add a new instance using the template you just uploaded

  4. NOTE: This will not be an active VM, so you will need to change the DNS to point to this virtual machine’s IP. If there was a dedicated VPN this will also need to be recreated in the new account

  5. Next, set up any snapshot schedules you wish this VM to maintain.

  6. After you verify everything is running in the new account and the routing is configured appropriately, log out of the new account

After 24 hours, complete the next steps

  1. NOTE: Before proceeding ensure the new virtual machine is working and there are no issues.

  2. Log back into the old account

  3. Remove any snapshots of the old VM

  4. If the old VM had a dedicated IP address, release the IP and any firewall and port forwarding rules attached.

  5. If there were any special network configurations that remain, clean those up as well. For example, this could be remains of an old VPN, etc.

  6. Delete the old virtual machine

  7. Log out of the old account

We hope this step-by-step guide to migrating virtual machines to a new or different account within CloudStack is helpful. As leading CloudStack consultants, we understand the importance of having flexibility within your environment. Moving virtual machines is just one of the common questions we answer on a regular basis. If you have additional questions, please don't hesitate to ask by calling our support line or on Twitter @appcore.