Protect your Hyper-V Virtual Machines with Azure Site Recovery and Windows Admin Center
Applies To: Windows Admin Center Preview, Windows Admin Center
Windows Admin Center streamlines the process of replicating your virtual machines on your Hyper-V servers or clusters, making it easier to leverage the power of Azure from your own datacenter. To automate setup, you can connect the Windows Admin Center gateway to Azure.
Use the following information to configure replication settings and create a recovery plan from within the Azure portal, enabling Windows Admin Center to start VM replication and protect your VMs.
What is Azure Site Recovery and how does it work with Windows Admin Center?
Azure Site Recovery is an Azure service that replicates workloads running on VMs so that your business-critical infrastructure is protected in case of a disaster. Learn more about Azure Site Recovery.
Azure Site Recovery consists of two components: replication and failover. The replication portion protects your VMs in case of disaster by replicating the target VM's VHD to an Azure storage account. You can then failover these VMs and run them in Azure in the event of a disaster. You can also perform a test failover without impacting your primary VMs to test the recovery process in Azure.
Completing setup for the replication component alone is sufficient to protect your VM in the case of disaster. However, you won't be able to start the VM in Azure until you configure the failover portion. You can set up the failover portion when you want to failover to an Azure VM - this isn't required as part of the initial setup. If the host server goes down and you haven't yet configured the failover component, you can configure it at that time and access the workloads of the protected VM. However, it's a good practice to configure the failover related settings before a disaster.
Prerequisites and planning
- The target servers hosting the VMs you want to protect must have Internet access to replicate to Azure.
- Connect your Windows Admin Center gateway to Azure.
- Review the capacity planning tool to evaluate the requirements for successful replication and failover.
Step 1: Set up VM protection on your target host
You need to do this step once per host server or cluster containing VMs targeted for protection.
- Navigate to the server or cluster hosting VMs you want to protect (either with Server Manager or Hyper-Converged Cluster Manager).
- Go to Virtual Machines > Inventory.
- Select any VM (this doesn't need to be the VM you want to protect).
- Select More > Set up VM Protection.
- Sign into your Azure Account.
Enter the required information:
- Subscription: The Azure subscription you want to use for replication of VMs on this host.
- Location: The Azure region where the ASR resources should be created.
- Storage Account: The storage account where replicated VM workloads on this host will be saved.
- Vault: Choose a name for the Azure Site Recovery vault for protected VMs on this host.
Select Setup ASR.
- Wait until you see the notification: Site Recovery Setting Completed.
This could take up to 10 minutes. You can watch the progress by going to Notifications (the bell icon at the top right).
This step automatically installs the ASR agent onto the target server or nodes (if configuring on a cluster), creates a Resource Group with the Storage Account and Vault specified, in the Location specified. This will also register the target host with the ASR service and configure a default replication policy.
Step 2: Select virtual machines to protect
- Navigate back to the server or cluster you configured in step 2 above, and go to Virtual Machines > Inventory.
- Select the VM you want to protect.
- Select More > Protect VM.
Review the capacity requirements for protecting the VM.
If you want to use a premium storage account, create one in the Azure portal. The Create New option provided in the Windows Admin Center pane creates a standard storage account.
Enter the name of the Storage Account to use for this VM's replication, and select Protect VM. This step enables replication for the selected Virtual Machine.
ASR will start replication. Replication is completed and the VM is protected when the value in the Protected column of the Virtual Machine Inventory grid changes to Yes. This can take several minutes.
Step 3: Configure and run a test failover in the Azure portal
Although you don't need to complete this step when starting VM replication (the VM will already be protected with just replication), we recommend you configure failover settings when you set up Azure Site Recovery. If you want to prepare for failover to an Azure VM, complete the following steps:
Set up an Azure network the failed-over VM will attach to this VNET. Note that the other steps listed in the linked page are completed automatically by Windows Admin Center; you only need to set up the Azure network.
Step 4: Create Recovery Plans
Recovery Plan is a feature in Azure Site Recovery that lets you failover and recover an entire application comprising a collection of VMs. While it is possible to recover protected VMs individually, by adding the VMs comprising an application to a recovery plan, you'll be able to failover the entire application through the recovery plan. You can also use the test failover feature of Recovery Plan to test the recovery of the application. Recovery Plan lets you group VMs, sequence the order in which they should be brought up during a failover, and automate additional steps to be performed as part of the recovery process. Once you've protected your VMs, you can go to the Azure Site Recovery vault in the Azure portal and create recovery plans for these VMs. Learn more about recovery plans.
Monitoring replicated VMs in Azure
To verify there are no failures in server registration, go to the Azure portal > All resources > Recovery Services Vault (the one you specified in Step 2) > Jobs > Site Recovery Jobs.
You can monitor VM replication by going to the Recovery Services Vault > Replicated Items.
To see all servers that are registered to the vault, go to Recovery Services Vault > Site Recovery Infrastructure > Hyper-V hosts (under the Hyper-V sites section).
When registering ASR with a cluster, if a node fails to install ASR or register to the ASR service, your VMs may not be protected. Verify that all nodes in the cluster are registered in the Azure portal by going to the Recovery Services vault > Jobs > Site Recovery Jobs.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.