Replicate Azure virtual machines to another Azure region

This article describes how to enable replication of Azure VMs, from one Azure region to another.

Prerequisites

This article assumes that you've already set up Site Recovery for this scenario, as described in the Azure to Azure tutorial. Make sure that you've prepared the prerequisites, and created the Recovery Services vault.

Enable replication

Enable replication. This procedure assumes that the primary Azure region is East Asia, and the secondary region is South East Asia.

  1. In the vault, click +Replicate.

  2. Note the following fields:

    • Source: The point of origin of the VMs, which in this case is Azure.

    • Source location: The Azure region from where you want to protect your virtual machines. For this illustration, the source location is 'East Asia'

    • Deployment model: Azure deployment model of the source machines.

    • Source subscription: The subscription to which your source virtual machines belong. This can be any subscription within the same Azure Active Directory tenant where your recovery services vault exists.

    • Resource Group: The resource group to which your source virtual machines belong. All the VMs under the selected resource group are listed for protection in the next step.

      Enable replication

  3. In Virtual Machines > Select virtual machines, click and select each VM that you want to replicate. You can only select machines for which replication can be enabled. Then, click OK. Enable replication

  4. In Settings, you can optionally configure target site settings:

    • Target Location: The location where your source virtual machine data will be replicated. Depending upon your selected machines location, Site Recovery will provide you the list of suitable target regions. We recommend that you keep the target location the same as the Recovery Services vault location.

    • Target subscription: The target subscription used for disaster recovery. By default, the target subscription will be same as the source subscription.

    • Target resource group: The resource group to which all your replicated virtual machines belong. By default Azure Site Recovery creates a new resource group in the target region with name having "asr" suffix. In case resource group created by Azure Site Recovery already exists, it is reused. You can also choose to customize it as shown in the section below. The location of the target resource group can be any Azure region except the region in which the source virtual machines are hosted.

    • Target Virtual Network: By default, Site Recovery creates a new virtual network in the target region with name having "asr" suffix. This is mapped to your source network, and used for any future protection. Learn more about network mapping.

    • Target Storage accounts (If your source VM does not use managed disks): By default, Site Recovery creates a new target storage account mimicking your source VM storage configuration. In case storage account already exists, it is reused.

    • Replica managed disks (If your source VM uses managed disks): Site Recovery creates new replica managed disks in the target region to mirror the source VM's managed disks with the same storage type (Standard or premium) as the source VM's managed disk.

    • Cache Storage accounts: Site Recovery needs extra storage account called cache storage in the source region. All the changes happening on the source VMs are tracked and sent to cache storage account before replicating those to the target location.

    • Target availability sets: By default, Azure Site Recovery creates a new availability set in the target region with name having "asr" suffix for the VMs part of an availability set in source region. In case availability set created by Azure Site Recovery already exists, it is reused.

    • Target availability zones: By default, Site Recovery assigns the same zone number as the source region in target region if the target region supports availability zones.

      If the target region does not support availability zones, the target VMs are configured as single instances by default. If required, you can configure such VMs to be part of availability sets in target region by clicking 'Customize'.

      Note

      You cannot change the availability type - single instance, availability set or availability zone, after you enable replication. You need to disable and enable replication to change the availability type.

    • Replication Policy: It defines the settings for recovery point retention history and app consistent snapshot frequency. By default, Azure Site Recovery creates a new replication policy with default settings of ‘24 hours’ for recovery point retention and ’60 minutes’ for app consistent snapshot frequency.

      Enable replication

Customize target resources

You can modify the default target settings used by Site Recovery.

  1. Click Customize: next to 'Target subscription' to modify the default target subscription. Select the subscription from the list of all the subscriptions available in the same Azure Active Directory (AAD) tenant.

  2. Click Customize: to modify default settings:

    • In Target resource group, select the resource group from the list of all the resource groups in the target location of the subscription.

    • In Target virtual network, select the network from a list of all the virtual network in the target location.

    • In Availability set, you can add availability set settings to the VM, if they're part of an availability set in the source region.

    • In Target Storage accounts, select the account you want to use.

      Enable replication

  3. Click Customize: to modify replication settings.

    • In Multi-VM consistency, select the VMs which you want to replicate together
    • All the machines in a replication group will have shared crash consistent and app-consistent recovery points when failed over. Enabling multi-VM consistency can impact workload performance (as it is CPU intensive) and should be used only if machines are running the same workload and you need consistency across multiple machines. For example, if an application has 2 sql virtual machines and 2 web servers then you should add only sql virtual machines as a part of replication group.
    • You can choose to have at max 16 virtual machines in a replication group.
    • If you enable multi-VM consistency, machines in the replication group communicate with each other over port 20004. Ensure that there is no firewall appliance blocking the internal communication between the VMs over port 20004. If you want Linux VMs to be part of a replication group, ensure the outbound traffic on port 20004 is manually opened as per the guidance of the specific Linux version. Enable replication
  4. Click Create target resource > Enable Replication.

  5. After the VMs are enabled for replication, you can check the status of VM health under Replicated items

Note

During initial replication the status might take some time to refresh, without progress. Click the Refresh button, to get the latest status.

Next steps

Learn more about running a test failover.