Fail over Hyper-V VMs to Azure
This tutorial describes how to fail over Hyper-V VMs to Azure with Azure Site Recovery. After you've failed over, you fail back to your on-premises site when it's available. In this tutorial, you learn how to:
- Verify the Hyper-V VM properties to check conform with Azure requirements.
- Fail over specific VMs to Azure.
This tutorial is the fifth tutorial in a series. It assumes that you have already completed the tasks in the previous tutorials.
- Prepare Azure
- Prepare on-premises Hyper-V
- Set up disaster recovery for Hyper-V VMs, or for Hyper-V VMs managed in System Center VMM clouds
- Run a disaster recovery drill
Prepare for failover
Make sure there are no snapshots on the VM, and that the on-premises VM is turned off during failback. It helps ensure data consistency during replication. Don't turn on on-premises VM during failback.
Failover and failback have three stages:
- Failover to Azure: Failover Hyper-V VMs from the on-premises site to Azure.
- Failback to on-premises: Failover Azure VMs to your on-premises site when the on-premises site is available. It starts synchronizing data from Azure to on-premises and on completion, it brings up the VMs on on-premises.
- Reverse replicate on-premises VMs: After failed back to on-premises, reverse replicate the on-premises VMs to start replicating them to Azure.
Verify VM properties
Before failover verify the VM properties, and make sure that the VM meets with Azure requirements.
In Protected Items, click Replicated Items > VM.
In the Replicated item pane, there's a summary of VM information, health status, and the latest available recovery points. Click Properties to view more details.
In Compute and Network, you can modify the Azure name, resource group, target size, availability set, and managed disk settings.
You can view and modify network settings, including the network/subnet in which the Azure VM will be located after failover, and the IP address that will be assigned to it.
In Disks, you can see information about the operating system and data disks on the VM.
Fail over to Azure
- In Settings > Replicated items, click the VM > Failover.
- In Failover, select the Latest recovery point.
- Select Shut down machine before beginning failover. Site Recovery attempts to do a shutdown of source VMs before triggering the failover. Failover continues even if shutdown fails. You can follow the failover progress on the Jobs page.
- After you verify the failover, click Commit. It deletes all the available recovery points.
Don't cancel a failover in progress: If you cancel in progress, failover stops, but the VM won't replicate again.
Connect to failed-over VM
- If you want to connect to Azure VMs after failover by using Remote Desktop Protocol (RDP) and Secure Shell (SSH), verify that the requirements have been met.
- After failover, go to the VM and validate by connecting to it.
- Use Change recovery point if you want to use a different recovery point after failover. After you commit the failover in the next step, this option will no longer be available.
- After validation, select Commit to finalize the recovery point of the VM after failover.
- After you commit, all the other available recovery points are deleted. This step completes the failover.
If you encounter any connectivity issues after failover, follow the troubleshooting guide.
After failover, reprotect the Azure VMs so that they replicate from Azure to on-premises. Then, after the VMs are reprotected and replicating to the on-premises site, fail back from Azure when you're ready.