How To Migrate Machines To Azure

Posted on June 20, 2016 by Aidan Finn in Cloud Computing with 0 Comments

Azure Cloud Hero Server Devices

In this “how do I ..?” article I will explain how you can use Azure Site Recovery (ASR) to migrate machines, VMware, physical, or Hyper-V, running Windows or Linux, to Azure with minimized downtime.

Background

Back in 2014, I wrote an article that showed you 5 ways that you could use to move virtual machines from your computer room or data center to Azure. Back then, Microsoft had a different vision for Azure features such as Azure Site Recovery (focused just on large enterprises) and how they would support a migration to Azure. Things have moved on, so I thought I’d write an updated post on how to get your machines into Azure.

Azure Site Recovery

Microsoft’s DR site-in-the-cloud replication feature is the solution for getting machines into Azure. ASR can replicate the following types of Windows or Linux machine into Azure:

  • Windows Server 2012 R2 Hyper-V or Hyper-V Server 2012 R2, with or without System Center Virtual Machine Manager.
  • vSphere
  • Physical machines

Microsoft added support for VMware and physical machines thanks to the acquisition of InMage Scout. This was originally going to be used to power a solution called the Migration Accelerator, but Microsoft realized that they were wasting effort – a planned failover in ASR would do exactly the same thing that ASR would do.

A planned failover is when you decide to proactively move a machine from one location to another. In the case of ASR, a planned failover will:

  1. Stop the on-premises machine
  2. Flush the last piece of replication to Azure, ensuring that there is no data loss
  3. Start the machine in Azure

You might think of this as a “stretch quick migration” – there is a small amount of downtime, but it’s not much and it’s very manageable if planned for a maintenance window.

Sponsored

Migrating Machines to Azure using ASR

Using ASR is a supported, and recommended, scenario for migrating machines to Azure. ASR will allow you to seed the migration by performing a full synchronization followed by continuous asynchronous replication (every 30 seconds, or every 5 or 15 minutes) until you are ready to migrate a machine or service comprised of lots of machines.

ASR includes a failover automation feature called recovery plans. You can create a recovery plan to fail over machines in a desired order. Note that a recovery plan can use PowerShell scripts, in the form of Azure Automation, to perform additional steps and request manual intervention where automation is not possible. It is strongly recommended that you create a recovery plan for a machine migration:

  • You can run a test failover on an isolated network to ensure that the migration will succeed. You can delete the test and make changes until you are happy, without impacting any production systems that are executing on-premises.
  • When the time comes to migrate, all servers will switch over to Azure in the desired order and in a pre-planned and a fully rehearsed manner.

Note that a recovery plan scales differently for organizations:

  • A smaller organization might have one recovery plan for all machines.
  • A large enterprise might use a recovery plan for each service.
  • A huge organization might use many recovery plans per service.

Hybrid networks can connect on-premises and in-Azure networks to allow services to span both locations.

The process that Microsoft recommends is depicted in the below diagram:

  1. Storage: You will require at least one GRS storage account and a Site Recovery Vault in your Azure subscription.
  2. Register the on-premises servers: Register all VMware & Hyper-V hosts and physical servers in ASR.
  3. Protect machines: Enable replication of the desired physical and virtual machines using ASR. Wait for those machines to replicate.
  4. Mapping: Create all of the required virtual networks/subnets in Azure, preconfigure Azure virtual machines specifications, and assign any required network settings (failover network, reserved IP addresses, and so on).
  5. Test recovery plan: Create a recovery plan and perform test failovers. Document everything that must be modified during a test and repeat this process until you are happy that a planned failover will succeed.
  6. Planned failover: Pay tribute to whatever deity/deities you worship (or start to that day), and start a planned failover of the recovery plan.
  7. Validation: Verify that everything is running successfully in Azure.
  8. Cleanup: Remove replication and recycle the old on-premises equipment.
10.Using Azure Site Recoery to migrate machines to Azure [Image Credit: Microsoft]

10. Using Azure Site Recovery to migrate machines to Azure [Image Credit: Microsoft]

How Much Will This Cost?

Sponsored

If you are relatively quick, then a migration using ASR will not cost you a penny, according to the ASR pricing page:

… it does not matter how long you have been using Azure Site Recovery. Every protected instance incurs no ASR charges for the first 31 days.

That means that, no matter how long you have used the ASR service, the first 31 days of replication for any machine is free. If you migrate a machine and remove replication within 31 days then an ASR-powered migration will not cost you a cent.

Sponsored