Migrating your Windows Server 2003 workloads to Microsoft Azure
A few weeks ago I explained how you could run any legacy OS in Microsoft Azure using Virtual Box. This was OK for testing purposes but not really suited for actually migrating resources to Microsoft Azure.
In this article we'll be looking at how you can really migrate a Windows Server 2003 to Microsoft Azure, which is actually possible because the Virtual Machines uses a custom version of Hyper-V. Note that, while this works, running Windows Server 2003 in Azure is not supported.
Preparing the VM
This post assumes that you have a 64-Bit version Windows Server 2003 R2 running or that you upgraded to R2. Since everything we'll be doing is based on Hyper-V you might need to migrate from VMWare first (using the Microsoft Virtual Machine Converter Solution Acceleratorfor example).
The first thing we'll do is install the Hyper-V Integration Services. This will make sure your VM gets network connectivity etc.. both on your local Hyper-V as in Microsoft Azure:
After installing the Integration Services you'll have a network connection, so you can start by installing the Windows Updates to make sure your VM is up-to-date:
Now when our VM will be running in Azure we will want to connect to the VM using RDP/Telnet/… That's why we need to open the required ports on the Firewall before uploading the VM to Microsoft Azure:
We're now all set to start our deployment to Microsoft Azure, and you can now shut down the machine.
Creating a Disk
The next thing we'll do is upload the VHD of our machine to a storage account using PowerShell:
Add-AzureVhd [-Destination] <Uri> [-LocalFilePath] <FileInfo> [[-NumberOfUploaderThreads] <Int32> ] [[-BaseImageUriToPatch] <Uri> ] [[-OverWrite]] [ <CommonParameters>]
Remember that you'll be uploading a few GB of data so this could take some time.
And once the VHD has been uploaded you have to register the VHD as a Disk, allowing you to create a VM using that Disk:
Add-AzureDisk [-DiskName] <String> [-MediaLocation] <String> [-Label <String> ] [-OS <String> ] [ <CommonParameters>]
Creating a Virtual Machine
The last thing we'll need to do is create a new Virtual Machine with the Disk we just created:
After a few minutes the Virtual Machine will be online and your Windows Server 2003 machine is now running in Microsoft Azure: