Step-By-Step: Migrating From VMware to Microsoft Azure

Microsoft's investment in Azure is tremendous and by today's announcements show no signs of stopping. Announcements made at World Partner Conference also highlighted significant gains in Hyper-V 2012 R2 adoption over previous years. In light of this, last year's post entitled Step-By-Step: Migrating From VMware to Microsoft Hyper-V Server 2012 now becomes the first step to an even larger endeavour than what it was originally intended for. With the advent of the cloud becoming more and more accepted as best practice for seamless scalability and redundancy, it might be a good time to take the next step and begin pondering moving your organizations to the cloud.

Disclaimer: This post's intention is to not slight any other virtualization offering

 

Step 1: Complete Step-By-Step: Migrating From VMware to Microsoft Hyper-V Server 2012

This previous Step-By-Step is important as it provides guidance as to converting your VMware VM into a Hyper-V VM.

Step 2: Run your newly converted VMs in Hyper-V and update the drivers

Once the VM conversion process has completed, the Hyper-V Integration Services drivers inside the VM should be upgraded. Hyper-V Manager is required to complete this step.

  1. Click on Hyper-V Manager located on the taskbar 
     

  2. Select the newly converted VM amidst the list of VMs
     

      

  3. Right-Click the selected VM and select Connect within the pop-up menu 
     

  4. Login to the VM by selecting the Ctrl-Alt-Del button located on the top left on the Action Bar 
     

  5. Enter your password and login to your VM
     

  6. Click the Action menu item on the menu bar and select Insert Integration Services Setup Disk


     

  7. Click OK to install Hyper-V Integration Services

  8. Click Yes to complete the installation and to restart the VM

    Note: At this point updates are now being applied to the VM

  9. Once the VM has rebooted, click the Action item on the menu bar and select Shut Down
     

  10. Select Shut Down once more in the warning dialog box then close the VM

 
Step 3: Provisioning the VM in Windows Azure

Once the drivers within the VM have been update, the VM needs to be copied to Windows Azure Storage to be provisioned on Windows Azure Infrastructure Services. PowerShell will be utilized to do this utilizing the Windows Azure PowerShell Module.

  1. Sign-up for a FREE 90-day trial of Windows Azure so that the steps provided can be completed.
     
    NOTE: When signing up for the process, credit card information will be requested to confirm that you are a legitimate free trial subscriber. Credit card information is only used to confirm identity and will NOT be charged for any Windows Azure services unless the trial subscription is explicitly convert into a paid subscription at a later date 
     

  2. Download and install the Windows Azure PowerShell Module
     

  3. Right-click the PowerShell item and select Run ISE as Administrator

    Note: Variables require setup within the PowerShell code snippets to point to the values of your Windows Azure Storage Account and the source and destination VHD paths. These paths may differ from the CANITPRO Lab example so please take that into account.
     

  4. Set the Azure Storage Account Name by using the following PowerShell entry:

    $myStorageAcct = "CANITPROLabStor01"

    and click the Run Selection button located on the top menu bar.
     

  5. Set the source path and destination path utilizing a fixed sized VHD using the following PowerShell entry:

    $mySourceVHD = "D:\VHD\WS2012VM01\disk-0.vhd"
    $myDestVHD = "https://" + $myStorageAcct + ".blob.core.windows.net/vhds/WS2012VM01-VHD.vhd"

     and click the Run Selection button located on the top menu bar.
     

  6. Upload the VHD to the Azure storage account using the following PowerShell entry:

    Add-AzureVhd -LocalFilePath $mySourceVHD -Destination $myDestVHD

    click the Run Selection button located on the top menu bar.
     
    Note: Utilization of the Add-AzureVhd PowerShell cmdlet is required to upload the prepared VHD to Windows Azure Storage. The time required for the upload process will vary based on the number of used blocks inside the VHD and the speed of your Internet connection. The progress will update automatically and indicate the upload progress.
     

  7. Assign the VHD to the Azure Disk using the following PowerShell entry:

    Add-AzureDisk -OS Windows -MediaLocation $myDestVHD
    -DiskName WS2012VM01-VHD

    and click the Run Selection button located on the top menu bar.
     
    Note: Once the VHD upload is competed, the VHD now needs to be registered as a virtual disk from which a new Windows Azure VM can be provisioned. The Add-AzureDisk PowerShell cmdlet will be utilized to complete this task.
     

  8. Provision the Azure VM by using the following PowerShell entry:

    $myVMName = "WS2012VM01" # Set to desired VM name

    $myCloudService = "WS2012VM01" # Needs to be unique in the cloud.net DNS namespace

    Select the fifth block of code and click the Run Selection button located on the top menu bar.
     
    Note: With the newly uploaded VHD now ready to be provisioned within Windows Azure, certain variables now require configuring to indicate the name of our new VM and it's associated Cloud Service. Once completed the new VM will be provisioned via two PowerShell cmdlets: New-AzureVMConfig and NewAzureVM
     

  9. Once the Powershell entry in step 8 has finished, complete the provision by using the following PowerShell entry:

    New-AzureVMConfig -Name $myVMName -InstanceSize Small
           -DiskName "$myVMName -VHD"
    New-AzureVM -ServiceName $myCloudService -Location "East US"

    and click the Run Selection button located on the top menu bar.
     

  10. Once provisioning of the Windows Azure Virtual Machine has been completed, click the Internet Explorer icon on the taskbar.

    Note: Internet Explorer is used to navigate to the Windows Azure Management Portal to confirm the provisioning status of the VM.
     

  11. Navigate to the Windows Azure Management Portal and select Virtual Machines in the side navigation panel.

      
     

Ensure that the newly provisioning VM is listed on the Virtual Machines page in the portal with a status of Running

Be sure to visit Microsoft Virtual Academy to gain further insight as to what Microsoft Azure has to offer. Complete the Azure for IT Pros Jump Start to better enable your understanding as to the power of the cloud.