Upload server to Azure (lessons learned)

I have had a need to move a few servers to a new test/development environment shared for several people. Azure was the preferred location of the servers and below are a process for uploading an on premise server to Azure (and some notes to create a template for deployment of servers).

Important bullets
  • Azure is running Microsoft Hyper-V
  • Currently Azure supports fixed VHD (not vhdx or dynamicdisk)
  • Must be stored as a page blob (and not block blob)
Before uploading (Windows server)
  • Add a local administrator with password
  • Enable RDP on the server
Convert VMWare image (if you are running VMWare)
  1. Install Microsoft Virtual Machine Converter (link)
  2. Convert VMWare image via PSH commands
    1. Import-Module C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1
    2. $source = "{path to VMWare image}\server.vmdk"
    3. ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath $source -DestinationLiteralPath {path to converted}\HyperV\ -VhdType Fixed -VhdFormat Vhd
Upload server (using CloudBerry Explorer for Azure)
  1. Create Azure storage (using Azure portal)
  2. Note down the access keys
  3. Download and install CloudBerry Explorer for Azure
  4. Use CloudBerry Explorer to upload the vhd file to Azure
    (be aware to upload as page blob)
Create a disk in Azure (for the uploaded VHD file)
A disk is what you can attach to a virtual machine later.
  1. Logon to Azure portal (https://manage.windowsazure.com) 
  2. Azure > Virtual Machines > Disks (in the top level bar)
  3. Create disk
    • Name
    • VHD URL (locate the vhd file you uploaded)
    • OS in image (checkbox)
    • OS Family
Create a Virtual Machine (attaching disk from above)
  1. Logon to Azure portal
  2. Azure > NEW > Virtual Machine > Quick Create
  3. Under image specification you choose "More Images"
    1. My Disks > "Name of disk in previous section"
Your Virtual Machine will be provisioned and you can access it using RDP in the Azure portal: Azure > Virtual Machines > Mark the server > Connect (in the "footer bar").

A few additional tips
  • Use a good naming structure for all your Azure services, storage, cloud services, etc
  • Have a good understanding of the Azure SLA
  • Delegate permissions with least privilegie model
  • Create good system and process documentation of servers and management
  • Educate yourself on the Azure platform

No comments: