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
- Start by logging into the cloud console of the old account
- Next stop the virtual machine you want to migrate
- Select the Volumes tab
- Take a snapshot of the root drive of the instance you would like to move
- 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.
- Next click download template and copy the URL
- 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.
- Log out of the old account
Process within the New Account
- Start by logging into the account that you wish to move the virtual machine to
- Upload the template using the copied URL
- Add a new instance using the template you just uploaded
- 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
- Next, set up any snapshot schedules you wish this VM to maintain.
- 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
- NOTE: Before proceeding ensure the new virtual machine is working and there are no issues.
- Log back into the old account
- Remove any snapshots of the old VM
- If the old VM had a dedicated IP address, release the IP and any firewall and port forwarding rules attached.
- 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.
- Delete the old virtual machine
- 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.
photo credit: Ocktobre