Delen via


Tutorial: Fail over Azure VMs to a secondary region

Learn how to fail over Azure VMs that are enabled for disaster recovery with Azure Site Recovery, to a secondary Azure region. After failover, you reprotect VMs in the target region so that they replicate back to the primary region. In dit artikel leert u het volgende:

  • Controleer de vereisten
  • VM-instellingen controleren
  • Run a failover to the secondary region
  • Start replicating the VM back to the primary region.

Opmerking

This tutorial shows you how to fail over VMs with minimal steps. If you want to run a failover with full settings, learn about Azure VM networking, automation, and troubleshooting.

Vereiste voorwaarden

Before you start this tutorial, you should have:

  1. Set up replication for one or more Azure VMs. If you haven't, complete the first tutorial in this series to do that.
  2. We recommend you run a disaster recovery drill for replicated VMs. Running a drill before you run a full failover helps ensure everything works as expected, without impacting your production environment.

Verify the VM settings

  1. In the vault >Replicated items, select the VM.

    Option to open the VM properties on the overview page

  2. On the VM Overview page, check that the VM is protected and healthy, before you run a failover. Page to verify the VM properties and state

  3. Before you fail over, check that:

Een failover uitvoeren

  1. On the VM Overview page, select Failover.

    Failover button for the replicated item

  2. In Failover, choose a recovery point. De Virtuele Azure-machine in de doelregio wordt gemaakt met behulp van gegevens van dit herstelpunt.

    • Laatst verwerkt: maakt gebruik van het meest recente herstelpunt dat door Site Recovery wordt verwerkt. Het tijdstempel wordt weergegeven. Er wordt geen tijd besteed aan het verwerken van gegevens, zodat er sprake is van een lage RTO (Recovery Time Objective).
    • Meest recente: verwerkt alle gegevens die naar Site Recovery worden verzonden om een herstelpunt voor elke VIRTUELE machine te maken voordat er een failover naar wordt uitgevoerd. Biedt het laagste Recovery Point Objective (RPO), omdat alle gegevens naar Site Recovery worden gerepliceerd wanneer de failover wordt geactiveerd.
    • Latest app-consistent: This option fails over VMs to the latest app-consistent recovery point. Het tijdstempel wordt weergegeven.
    • Aangepast: Overgang naar een specifiek herstelpunt. Aanpassingen zijn alleen beschikbaar wanneer u een failover uitvoert voor één VM en geen herstelplan gebruikt.

    Opmerking

    If you added a disk to a VM after you enabled replication, replication points shows disks available for recovery. For example, a replication point created before you added a second disk will show as "1 of 2 disks".

  3. Select Shut down machine before beginning failover if you want Site Recovery to try to shut down the source VMs before starting failover. Shutdown helps to ensure no data loss. Failover continues even if shutdown fails.

    Failover settings page

  4. Selecteer OK om de failover te starten.

  5. Monitor the failover in notifications.

    Voortgangsmelding Succesmelding

  6. After the failover, the Azure VM created in the target region appears in Virtual Machines. Make sure that the VM is running, and sized appropriately. If you want to use a different recovery point for the VM, select Change recovery point, on the Essentials page.

  7. When you're satisfied with the failed over VM, select Commit on the overview page, to finish the failover.

    Commit button

  8. In Commit, select OK to confirm. Commit deletes all the available recovery points for the VM in Site Recovery, and you won't be able to change the recovery point.

  9. Monitor the commit progress in notifications.

    Commit progress notification Commit success notification

Reprotect the VM

After failover, you reprotect the VM in the secondary region, so that it replicates back to the primary region.

  1. Make sure that VM Status is Failover committed before you start.

  2. Check that you can access the primary region is available, and that you have permissions to create VMs in it.

  3. On the VM Overview page, select Re-Protect.

    Button to enable reprotect for a VM for a VM.

  4. In Re-protect, verify the replication direction (secondary to primary region), and review the target settings for the primary region. Resources marked as new are created by Site Recovery as part of the reprotect operation.

    Reprotection settings page

  5. Select OK to start the reprotect process. The process sends initial data to the target location, and then replicates delta information for the VMs to the target.

  6. Monitor reprotect progress in the notifications.

    Reprotect progress notification Reprotect success notification

Volgende stappen

In this tutorial, you failed over from the primary region to the secondary, and started replicating VMs back to the primary region. Now you can fail back from the secondary region to the primary.