Last Update: Sep 04, 2024 | Published: Feb 25, 2015
In this article, I’ll show you step-by-step instructions for enabling Azure Site Recovery (ASR) replication of Hyper-V virtual machines to Azure so you can have DR-as-a-Service (DRaaS) or a disaster recovery (DR) site in the cloud.
Before proceeding, check the Azure Site Recovery prerequisites that include the following:
The first item to create in Azure is a Site Recovery Vault. In the old Azure management portal, click New > Data Services > Recovery Services > Site Recovery Vault, enter the name of the vault and select the region of your choice.
Browse into the Site Recovery Vault after it is created and navigate to Servers > Hyper-V Sites. Click Create Hyper-V Site. This creates a logical unit that all of your hosts will reside in.
Navigate to the Quick Start guide of your vault, which is indicated by a little cloud with a lightning bolt to the left of Dashboard, making sure the drop-down box is set to Between An On-Premises Hyper-V Site And Azure, and click Download A Registration Key. You will be prompted to download a file after a few seconds. Save this file somewhere secure because the file contains a set of credentials that allows a server to create an initial connection to your ASR vault and Hyper-V Site. Note that you can reuse this file on multiple hosts for up to five days.
In the Quick Start guide, click Download The Provider. The provider is the agent that you will be installing on each host that you will replicate agents from.
Log into each host that runs virtual machines that you want to replicate to Azure and run the setup program for the ASR provider. In the case of a Hyper-V cluster, you will install the provider on every host. Click Continue to start the host registration process.
After setting up the provider you will register each host. The first screen allows you to configure how the host communicates with the Internet. The options are:
The Vault Settings screen is where you will provide the registration key file to connect the host to the Hyper-V Site in ASR. Click Browse and navigate and select the registration key file that you previously downloaded. The wizard will verify that the connection details are valid and present them for you to review, as shown below.
Note that if you are registering and unregistering the host frequently, then you might get an error saying “The DRA Server Is Already Registered.” This is because a registry key has not been cleaned up during the previous uninstall. Uninstall Microsoft Azure Recovery Services Agent and Microsoft Azure Site Recovery Provider from the host, delete the entire Azure Site Recovery key from HKLMSOFTWAREMicrosoft, and then reinstall the provider again.
The wizard will finish. A part of this process will create and import a certificate that will be used by the host to securely authenticate with ASR and encrypt Hyper-V Replica traffic.
You can verify the registration by returning to the Azure management portal, browsing into your ASR vault, and then navigating to Servers > Hyper-V Sites. You should see a registration for your server, in your new Hyper-V Site with a status of Connected.
A protection group does a few things:
Browse to Protected Items > Protection Groups and click Create Protection Group. In the first screen of the wizard, enter a name for the protection group, select the Hyper-V Site that you created, and then confirm the Azure subscription and storage account that you want to use.
The second screen in the wizard is where you configure the replication policy. These settings include:
When you finish this wizard, you will be at the point where you can start to configure per-virtual machine replication to Azure. You can find instructions for this in a post that’s coming soon.