Part 2: Migrating a Microsoft Azure VM from Microsoft Azure to AWS

In the previous installment, I explained how to download a virtual disk from Microsoft Azure. I also showed you how to reduce the physical size of the virtual disk to make it easier to upload.
This article will show you how to prepare a virtual hard drive for Amazon Web Services (AWS). It will also show you how to turn it into an AWS instance.
AWS has a list of requirements that you must follow in order to successfully import virtual machines (VMs) into AWS. I will show you some of the most important tasks, and then I will provide a link to the complete list at the end.
As it stands now, you probably have a virtual disk that has been downloaded to Azure. I assume that you have the required licenses to access the software on the virtual hard drive.
To prepare the virtual hard drive, we must temporarily attach it to a VM. Virtual Machine option from the Actions pane. This will launch the New Virtual Machine Wizard. To skip the wizard’s Welcome screen, click Next. Next, enter a name for your temporary VM and click Next.
Now you will be prompted to choose a VM generation. As shown in Figure 1, you must choose the Generation 1 option.
[Click on the image to see a larger view.] Figure 1: Create a virtual machine of generation 1. Click Next and then assign the appropriate amount of memory for the VM. Click Next to choose how the VM will be connected to your network. This VM is temporary, but it is a good idea to provide network connectivity.
Click Next to proceed to the screen that is used to create virtual hard drives. You already have a virtual disk. Select the option to use it. Next, specify the path and filename of the virtual disk you downloaded. Figure 2 shows how this works. To create the VM, click Finish.
[Click on the image to see a larger version.] Figure 2: Attach the virtual hard drive to the virtual machine. Now, open Hyper-V Manager’s VM console and boot the virtual machine.
After the VM boots, I recommend running Windows Update to ensure that the VM is up-to-date with Microsoft’s latest updates. Keep in mind that the update process can be resource-intensive. AWS charges for the resources used. So why not save some money and perform the update locally?
Next, verify the free space on your virtual hard disk. AWS requires at least 250MB of space. The DIR command is the easiest way to check a VM’s free space. Figure 3.
[Click on the image to see a larger view.] Figure 3: Make sure the virtual machine has enough space. Next, ensure that the VM has only one network interface. This is easiest to do by typing the following command.
Netsh Interface Show Interface You can delete additional network adapters if you have multiple.
[Click on the image to see a larger version.] Figure 4: Ensure that there is only one network adapter. It is likely that the VM can now be Sysprep’d and imported into AWS. It is a good idea, however, to review AWS’ list limitations to ensure that there are no other issues. This list can be found here.
Sysprep randomly assigns the VM to a host and prepares it for cloud use. Sysprep can cause damage, as we have already mentioned. Microsoft’s Sysprep documentation can be found here.
Sysprep will require you to use the Generalize or OOBE switches. OOBE stands to Out of Box Experience. It is essential.