How to Migrate an Amazon AWS Machine to Azure

This post will show how to move a VM from just about anywhere including Amazon AWS to Microsoft Windows Azure easily and for free using the Windows Azure Migrator tool available here:- http://www.azuremigrator.net

image

Requirements

In order to carry out the steps below there must be a VM running in Amazon so you will need an Amazon account and Administrative RDP access.  There should also be an Azure account in which to move it to of course.

    Click on install to set up the components or launch if this has already been done previously. Run the setup.exe program.

image

    Click Install

image

Once installed select the mode, we are going to Move the VM to Azure so click the second button.

image

      First a snapshot is created locally, currently only the OS drive is available, select Temp Storage location which has enough space for the VHD (Approx 17GB for a Win 2008, small image without too much installed on it).  Click

Create

      and wait for the creation to complete, you will see the drive being created on the Temp Storage location specified.

image

            This process took around around 10 minutes.

image

    Click Next and enter the Azure Subscription ID that you wish to move the VM to.

image

    Click Create Certificate and an Explorer windows will open with a new certificate, copy and paste this onto your own computer ready to upload to Azure.
    Here we see I have copied the file to my desktop (simply right click, copy and paste onto your desktop).

image

    Log into your Windows Azure account and select Settings and find your subscription as shown here.

image

Select Management Certificates and click the Upload button.

image

Browse to the desktop folder or wherever the cert was saved and upload.

image

Wait for upload to complete.

image

image

Once uploaded test the connection from within the AWS machine and you should see a green tick appear Smile.

If not check the correct certificate was upload or create and upload another.

image

Click Next.

Select the Storage account and container you wish to place the VM in. Pretty cool.

image

Click upload to send the VHD to Azure.

image

Once complete it will show “Upload Complete” and you will be able to see your VHD in Azure !

image

Azure Storage account shows the VHD at the bottom here. Very nice.

image

Now for some really smart stuff.  Select a new cloud service or an existing one, select affinity group, network and machine size !  A suggestion to the developer from me would be to add a subnet selection option in a future release but this is already awesome.

image

Click “Create VM

You should see the VM now being created if all parameters such as subscription limits etc are met.  Here we see our machine in place and starting up and part of the cloud service (infdpm) specified in the migrator tool.

image

If we click on Configure once the VM is in the running state we can see the size is correct and the virtual network. We can also now select an availability set if required.

image

We can also now connect to the VM using RDP.

image

Note the VM in Amazon still exists so shut down or remove if you want to save costs.   To show the successful migration, here is a mess-with-your-head screen shot of a connection to the VM in Azure FROM the original VM in Amazon.  It would sound better if I wrote a connection to itself but it’s not strictly true as it’s just a copy of it !

image

And here is a direct RDP connection to the Azure VM from my desktop just because.

image

Additional Notes and Reference

Here are the program files with the AWS tools on the machine.

image

The tools still remain as part of the VM so if the VM will not go back into AWS then it would be best to remove these.  Currently Azure has the option to install the Azure (Hyper-V) agent for new VMs but does not provide an installer at the moment for existing ones but I suspect this will be available at some point in the near future.

 

My Suggestions for future releases the Migrator Tool

Here are just a few suggestions, none of them biggies and the application is perfectly fine without these to get the VM across and any changes can be done afterwards in Azure

  • Allow user to specify Subnet for new VM in Azure
  • Allow user to specify Availability Set
  • Create a a Back Button to use from within the utility
  • Allow for multiple drives to be sent across and mounted correctly when new VM is created.
  • Option to remove AWS Agent software (when VM is created) if desired.

All in all a very useful tool for those looking to migrate from AWS without significant costs or headaches which we all want to avoid.  Thank you for reading. In the next post I will go through moving the Azure VM from one subscription to another.   If you have any ideas for the tool do share below.

 

Troubleshooting

You can not connect to the VM or it is not created in Azure.  Ensure you clicked the CREATE button and CREATE VM buttons in the wizard.

Not enough space error

image

Add another volume with sufficient space and use that for the temporary location.

Do add another disk volume, from the EC2 dashboard select Volumes and Create Volume

image

Ensure the disk you create is in the same region as the VM instance !  Here I create a 30GB drive which then presents itself in the AWS machine. You will then need to go into disk manager in Windows and format the drive to make it usable.

image

Once the new disk status becomes available right click and Attach to your VM instance.

image

image

Once the status in your console changes from attaching to attached the disk will be available for use in Windows.

image

Log into the VM and open Computer Management from the start menu (Windows 2008/R2) For windows 2012 just right click the lower left of the screen to open disk manager directly.

image

Once in Disk Management the popup will appear as Windows has detected a new disk. format it in your usual way.

image

Right click format and once complete the drive is available.

Error creating bootable partition.

This error is displayed when you click upload.  Press OK and the program will just continue ok.

image

Unhandled Exception The Subscription Policy limit for ‘cores count’ was exceeded.

Check your “In Use” Core count in Azure and shut down VMs not in use, increase or select appropriate size VM for the new machine.

To check limits in Azure go to Settings, select Usage in the top line of options.

image

Advertisements

About Mitesh Chauhan
Mitesh Chauhan, Azure Cloud Solutions Architect. This is my blog where I share articles and thoughts on IT Infrastructure and architecture. The topics I am most passionate about are Implementation and architecture of rock solid Cloud Infrastructure based around SQL Server and Windows Server mainly using Microsoft Azure. MCTS - Azure Architecture MCTS - Azure Implementation MCSE Server Infrastructure (Windows Server 2012) , MCITP SQL Server 2008, Togaf Certified, Prince 2 Practitioner.

5 Responses to How to Migrate an Amazon AWS Machine to Azure

  1. Tom Hickling says:

    Any plans for a Linux version of this?

    • Hello, Thanks for reading. No there is no plan for Linux. I have spoken to the developer (this is not my application) and there won’t be Linux support. So best to use a cloud storage tool and download the VHD files and upload to Azure.

  2. Vlad says:

    Hello, I’ve got similar app http://cloudscraper.migrate2iaas.com
    The main difference is you could migrate both sides: from Azure to AWS and back from AWS to Azure.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: