How to Configure Azure Site Recovery for Windows Server 2016
Azure Site Recovery (ASR) is a Microsoft Azure service that provides disaster recovery capabilities by continuously replicating on-premises workloads to Azure or to a secondary on-premises site. When a disaster occurs, ASR enables rapid failover to the replicated environment, bringing your workloads back online with minimal data loss and downtime. For Windows Server 2016 virtual machines running on Hyper-V or VMware, ASR provides near-continuous replication with recovery point objectives measured in seconds. This guide walks through setting up ASR to protect a Windows Server 2016 virtual machine hosted on Hyper-V, including vault creation, provider installation, replication configuration, and failover testing.
Before beginning, you need an active Azure subscription, a resource group in Azure to host the Recovery Services Vault, outbound internet connectivity from the Hyper-V host to Azure endpoints on TCP 443, and a basic understanding of Azure portal navigation. The Hyper-V host must be running Windows Server 2012 R2 or later, which includes Windows Server 2016.
Step 1: Create a Recovery Services Vault in Azure
Log in to the Azure portal at portal.azure.com. Search for Recovery Services vaults and click Create. Select your subscription, resource group, vault name such as ProdDRVault, and region. Choose a region that is geographically separate from your on-premises location for genuine disaster recovery protection. Click Review + create and then Create. Wait for the vault deployment to complete, then open the vault resource.
Step 2: Download and Install the Azure Site Recovery Provider
In the Recovery Services vault, click Site Recovery under Getting Started, then click Prepare Infrastructure. Select your protection goal: On-premises to Azure, Your machines are virtual, and Yes, with Hyper-V. Follow the wizard to add your Hyper-V site. Download the Azure Site Recovery Provider installer from the wizard and the vault registration key file. Copy both files to the Hyper-V host server.
Run the ASR Provider installer on the Hyper-V host. Accept the license terms and complete the installation. When prompted, browse to the vault registration key file to register the Hyper-V server with the Azure vault. This registration establishes the encrypted communication channel between the host and Azure:
AzureSiteRecoveryProvider.exe /x:C:ASRInstall /q
Step 3: Download and Install the Microsoft Azure Recovery Services Agent
On the same Hyper-V host, download and install the Microsoft Azure Recovery Services (MARS) agent from the vault wizard. This agent handles the actual data transfer from the Hyper-V host to Azure storage. After installation, register the agent with the vault using the same registration key. The agent installation does not require a reboot and begins synchronizing with the vault immediately after registration.
Step 4: Configure Replication for a Windows Server 2016 VM
Return to the Azure portal and open the Recovery Services vault. Under Protected Items, click Replicated Items, then click Replicate. Select the Hyper-V site you registered, choose the specific virtual machine to protect, and configure the target settings including the Azure region, target resource group, target virtual network, and storage account for replicated data. Set the replication policy, which defines the recovery point frequency (the default is every five minutes for crash-consistent recovery points and every four hours for application-consistent recovery points) and the recovery point retention window (up to 24 hours by default).
Click Enable Replication to start the initial replication. The first replication transfers a full copy of the VM’s virtual disks to Azure, which may take several hours or days depending on disk size and bandwidth. Monitor initial replication progress in the vault under Replicated Items.
Step 5: Monitor Replication Health
In the vault overview dashboard, review the replication health metrics. A healthy VM shows green status with delta-RPO (Recovery Point Objective) values indicating how old the latest recovery point is. If replication health turns critical, open the replicated item details to view the specific error message and recommended resolution steps. Common issues include network connectivity interruptions, storage capacity constraints in Azure, and VSS writer errors on the source VM. On the Hyper-V host, review the event log under Microsoft-Azure-SiteRecovery for detailed diagnostic messages:
Get-WinEvent -LogName "Microsoft-Azure-SiteRecovery/Operational" -MaxEvents 50 |
Where-Object { $_.LevelDisplayName -eq "Error" -or $_.LevelDisplayName -eq "Warning" } |
Select-Object TimeCreated, Message
Step 6: Create and Test a Recovery Plan
A Recovery Plan defines the order in which VMs are failed over, any pre-failover or post-failover scripts to run, and manual action steps. In the vault, under Manage, click Recovery Plans and then Add Recovery Plan. Name the plan ProdFailoverPlan and add the replicated VMs to the plan. Assign VMs to groups to control startup order: for example, put domain controllers in Group 1, application servers in Group 2, and web servers in Group 3.
Test the recovery plan without impacting production by clicking Test Failover. Select the latest recovery point and a designated Azure virtual network for the test. ASR creates cloned VMs from the latest replication snapshot in a sandboxed environment, allowing you to verify that the VMs boot correctly, that services start, and that the application functions before you ever need to perform a real failover.
Step 7: Perform a Planned Failover for Maintenance
For planned maintenance scenarios, execute a Planned Failover. ASR will synchronize the latest changes from on-premises to Azure and then start the Azure VMs before shutting down the on-premises VMs, ensuring zero data loss. After maintenance is complete, initiate a failback from the Azure portal to replicate the Azure VMs back to the on-premises Hyper-V host and then fail over back to on-premises:
# List ASR replicated items via Azure PowerShell
Get-AzRecoveryServicesAsrReplicationProtectedItem `
-ProtectionContainer (Get-AzRecoveryServicesAsrProtectionContainer `
-Fabric (Get-AzRecoveryServicesAsrFabric -Name "HyperVSite"))
Azure Site Recovery provides Windows Server 2016 workloads with enterprise-grade disaster recovery capabilities backed by Azure’s global infrastructure, enabling recovery time objectives measured in minutes rather than hours and giving your organization confidence that critical workloads can survive even a complete data center failure.