IT industry today is fast paced compared to any other industries in this century. Growth, Upgrade, Mobility, Availability are the buzz words in today’s world. This is the only industry which is more fashion driven than women’s fashion. With the growth of Cloud Computing, people are moving their existing infrastructure to Cloud. Many tech-giants like Amazon, Microsoft, Google, VMWare are offering their services in cloud computing.
Amazon Web Services and Microsoft Azure are very frequent names for cloud services. Azure argues that its platform allows businesses to fully take advantage of hybrid cloud platforms. Azure Logic Apps works with your existing assets like legacy softwares, ERP, etc and extend it to Azure cloud. Thus with Azure, extensibility is in your control.
Cloud Consultant always get below requirements:
Moving your on premise Windows Server to Microsoft Azure
Moving your Amazon EC2 Windows Instance to Microsoft Azure.
We have configured SharePoint Server or Exchange Server on AWS or on premise.
To setup the same environment on Azure from scratch, might be time consuming or complicated process. So in such cases we will want to migrate preconfigured server to Azure.
To solve the above problem, I’ll take you through the below steps to migrate your AWS or on premise Windows Instance to Azure.
Clone the EC2 system hard drive to virtual hard drive (VHD) using a utility.
Run the script to push that VHD to Azure Blob Storage.
Create a disk from blob storage.
Create a VM using disk.
Step 1: Creating VHD
First we will convert our system hard drive to VHD so that we can use it to create & launch VM. To convert your EC2 system hard drive to VHD, we will use Disk2VHD utility. Disk2VHD is a free utility that creates VHD from your physical volume for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines.
Into your EC2 instance, download Disk2VHD utility from the below link:
Once you run the above cmdlet, it will first calculate MD5 for that VHD file. MD5 hash of your file is to guarantee that your file is transferred correctly. After the MD5 is calculated successfully, a blob of the same size as the disk is allocated in your storage account. It will then start to upload your VHD to Azure.
Note: Uploading the VHD may take time, depending on the Internet connection and the size of the VHD.
Once the VHD is successfully uploaded, you will get the “Succeeded” message in PowerShell. You can then browse the VHD from Azure Storage. Before we can use the VHD as disk, it needs some configuration. We need to provide it some logical name that can be used in subsequent operations.
Step 3: Configuring Disk on Azure Portal
Configuration will allow us to make a disk from VHD from where we can specify that this particular VHD contains an Operating System to use it to create a VM from it. To accomplish this task, go through the following steps:
Navigate to Azure Portal
Go to Virtual Machines from the Menu
Move to “Disks” tab.
Under Disk tab, click on “Create” button.
Provide a logical name for the Disk.
Locate the VHD URL in Azure Blob Storage.
Select (check) the VHD contains an Operating System checkbox.
Ensure Windows is selected in Operating Systems family.
Click the “tick” button to create Azure Disk.
Step 4: Creating VM from Disk on Azure
Now that the disk is created, we shall create a VM using that disk. To create VM from the disk, follow the below steps:
Click on the Instances tab (on the Virtual Machines section of the Azure Portal)
Click on “New” button
Click on “From Gallery”
On the “Choose an Image” window, click on “My Disks”
Select the disk that you have created and click Next.
On the Virtual Machine configuration page, provide the VM name, tier as Standard, select the appropriate size and click Next.
On the next page, specify either a new cloud service or an existing Cloud Service.
Specify the Region that contains the VHD and leave the Availability Set option “None”. Leave the default Endpoints configuration & click Next.
On the third page, Unselect the “VM Agent that supports extensions” is already installed checkbox and click Launch.
After completing above procedure, you can check the status of VM under Virtual Machines tab.
You can RDP into your VM and verify that your installed configurations on Amazon EC2 are the same on this VM on Azure. Even the wallpaper is not changed.
So in this way you can move your Windows Instance from AWS or on premise to Azure and you don’t need to configure it whole again.
I hope the blog enriched you with some good handy information and tactics. Stay tuned for more such blogs on various Cloud platforms.