Replicate machines with Customer-Managed Keys (CMK) enabled disks
This article describes how to replicate Azure VMs with Customer-Managed Keys (CMK) enabled managed disks, from one Azure region to another.
You must create the Disk Encryption set(s) in the target region for the target subscription before enabling replication for your virtual machines that have CMK-enabled managed disks.
Use the following procedure to replicate machines with Customer-Managed Keys (CMK) enabled disks. As an example, the primary Azure region is East Asia, and the secondary region is South East Asia.
In the vault > Site Recovery page, under Azure virtual machines, select Enable replication.
In the Enable replication page, under Source, do the following:
Region: Select the Azure region from where you want to protect your VMs. For example, the source location is East Asia.
Subscription: Select the subscription to which your source VMs belong. This can be any subscription within the same Azure Active Directory tenant where your recovery services vault exists.
Resource group: Select the resource group to which your source virtual machines belong. All the VMs in the selected resource group are listed for protection in the next step.
Virtual machine deployment model: Select Azure deployment model of the source machines.
Disaster recovery between availability zones: Select Yes if you want to perform zonal disaster recovery on virtual machines.
In Virtual machines, select each VM that you want to replicate. You can only select machines for which replication can be enabled. You can select up to ten VMs. Then select Next.
In Replication settings, you can configure the following settings:
Under Location and Resource group,
Target location: Select the location where your source virtual machine data must be replicated. Depending on the location of selected machines, 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: Select the target subscription used for disaster recovery. By default, the target subscription will be same as the source subscription.
Target resource group: Select the resource group to which all your replicated virtual machines belong.
- By default, Site Recovery creates a new resource group in the target region with an asr suffix in the name.
- If the resource group created by Site Recovery already exists, it's reused.
- You can customize the resource group settings.
- The location of the target resource group can be any Azure region, except the region in which the source VMs are hosted.
You can also create a new target resource group by selecting Create new.
Failover virtual network: Select the failover virtual network.
You can also create a new failover virtual network by selecting Create new.
Failover subnet: Select the failover subnet.
Storage: Select View/edit storage configuration. Customize target settings page opens.
- Replica-managed disk: 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: 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 them to the target location. This storage account should be Standard.
Availability options: Select appropriate availability option for your VM in the target region. If an availability set that was created by Site Recovery already exists, it's reused. Select View/edit availability options to view or edit the availability options.
- While configuring the target availability sets, configure different availability sets for differently sized VMs.
- You cannot change the availability type - single instance, availability set or availability zone, after you enable replication. You must disable and enable replication to change the availability type.
Capacity reservation: Capacity Reservation lets you purchase capacity in the recovery region, and then failover to that capacity. You can either create a new Capacity Reservation Group or use an existing one. For more information, see how capacity reservation works. Select View or Edit Capacity Reservation group assignment to modify the capacity reservation settings. On triggering Failover, the new VM will be created in the assigned Capacity Reservation Group.
Storage encryption settings: Site Recovery needs the disk encryption set(s)(DES) to be used for replica and target managed disks. You must pre-create Disk encryption sets in the target subscription and the target region before enabling the replication. By default, a Disk encryption set is not selected. You must select View/edit configuration to choose a Disk encryption set per source disk.
Ensure that the Target DES is present in the Target Resource Group, and that the Target DES has Get, Wrap Key, Unwrap Key access to a Key Vault in the same region.
In Manage, do the following:
- Under Replication policy,
- Replication policy: Select the replication policy. Defines the settings for recovery point retention history and app-consistent snapshot frequency. By default, Site Recovery creates a new replication policy with default settings of 24 hours for recovery point retention.
- Replication group: Create replication group to replicate VMs together to generate Multi-VM consistent recovery points. Note that enabling multi-VM consistency can impact workload performance and should only be used if machines are running the same workload and you need consistency across multiple machines.
- Under Extension settings,
- Select Update settings and Automation account.
- Under Replication policy,
In Review, review the VM settings and select Enable replication.
During initial replication, the status might take some time to refresh, without apparent progress. Click Refresh to get the latest status.
I have enabled CMK on an existing replicated item, how can I ensure that CMK is applied on the target region as well?
You can find out the name of the replica managed disk (created by Azure Site Recovery in the target region) and attach DES to this replica disk. However, you will not be able to see the DES details in the Disks blade once you attach it. Alternatively, you can choose to disable the replication of the VM and enable it again. It will ensure you see DES and key vault details in the Disks blade for the replicated item.
I have added a new CMK enabled disk to the replicated item. How can I replicate this disk with Azure Site Recovery?
Addition of a new CMK enabled disk to an existing replicated item is not supported. Disable the replication and enable the replication again for the virtual machine.
I have enabled both platform and customer managed keys, how can I protect my disks?
Enabling double encryption with both platform and customer managed keys is supported by Site Recovery. Follow the instructions in this article to protect your machine. You need to create a double encryption enabled DES in the target region in advance. At the time of enabling the replication for such a VM, you can provide this DES to Site Recovery.
Submit and view feedback for