重新保护已故障转移到主要区域的 Azure VMReprotect failed over Azure VMs to the primary region

使用 Azure Site Recovery 将 Azure VM 从一个区域 故障转移到另一个区域后,VM 将在次要区域中启动,且 不受保护When you fail over Azure VMs from one region to another using Azure Site Recovery, the VMs boot up in the secondary region, in an unprotected state. 若要将 VM 故障回复到主要区域,请执行以下任务:If you want to fail back the VMs to the primary region, do the following tasks:

  1. 在次要区域中重新保护 VM,以便这些 VM 开始复制到主要区域。Reprotect the VMs in the secondary region, so that they start to replicate to the primary region.
  2. 重新保护完成并且 VM 开始复制后,可将其从次要区域故障转移到主要区域。After reprotection completes and the VMs are replicating, you can fail over from the secondary to primary region.

先决条件Prerequisites

  • 必须提交将 VM 从主要区域故障转移到次要区域的操作。The VM failover from the primary to secondary region must be committed.
  • 主要目标站点应该可用,并且应该能够在该区域中访问或创建资源。The primary target site should be available, and you should be able to access or create resources in that region.

重新保护 VMReprotect a VM

  1. 在“保管库” > “复制的项”中,右键单击已故障转移的 VM,并选择“重新保护”。 In Vault > Replicated items , right-click the failed over VM, and select Re-Protect . 重新保护方向应该显示为从次要区域到主要区域。The reprotection direction should show from secondary to primary.

    屏幕截图显示一个虚拟机,其中包含已选择“重新保护”的上下文菜单。

  2. 查看资源组、网络、存储和可用性集。Review the resource group, network, storage, and availability sets. Then click OK . 如果有任何资源标记为“新”,则表示它们是在重新保护过程中创建的。If there are any resources marked as new, they're created as part of the reprotection process.

  3. 重新保护作业使用最新数据植入目标站点。The reprotection job seeds the target site with the latest data. 该作业完成后,将发生增量复制。After the job finishes, delta replication takes place. 然后,可以故障转移回到主要站点。Then, you can fail over back to the primary site. 可以使用自定义选项,选择要在重新保护期间使用的存储帐户或网络。You can select the storage account or the network you want to use during reprotect, using the customize option.

    自定义选项

自定义重新保护设置Customize reprotect settings

可在重新保护期间自定义以下目标 VM 的属性。You can customize the following properties of the target VM during reprotection.

自定义

属性Property 注释Notes
目标资源组Target resource group 修改创建 VM 的目标资源组。Modify the target resource group in which the VM is created. 在重新保护的过程中,将删除目标 VM。As the part of reprotection, the target VM is deleted. 可以选择在故障转移后要在其下创建 VM 的新资源组。You can choose a new resource group under which to create the VM after failover.
目标虚拟网络Target virtual network 执行重新保护作业期间,无法更改目标网络。The target network can't be changed during the reprotect job. 若要更改网络,请重做网络映射。To change the network, redo the network mapping.
目标存储(辅助 VM 不使用托管磁盘)Target storage (Secondary VM doesn't use managed disks) 可以更改故障转移后 VM 使用的存储帐户。You can change the storage account that the VM uses after failover.
副本托管磁盘(辅助 VM 使用托管磁盘)Replica managed disks (Secondary VM uses managed disks) Site Recovery 在主要区域中创建副本托管磁盘以监视辅助 VM 的托管磁盘。Site Recovery creates replica managed disks in the primary region to mirror the secondary VM's managed disks.
缓存存储Cache storage 可以指定复制期间要使用的缓存存储帐户。You can specify a cache storage account to be used during replication. 默认情况下,如果不存在缓存存储帐户,则会创建一个帐户。By default, a new cache storage account is created, if it doesn't exist.
可用性集Availability set 如果次要区域中的 VM 属于可用性集,则可为主要区域中的目标 VM 选择可用性集。If the VM in the secondary region is part of an availability set, you can choose an availability set for the target VM in the primary region. 默认情况下,Site Recovery 会尝试在主要区域中查找并使用现有的可用性集。By default, Site Recovery tries to find the existing availability set in the primary region, and use it. 在自定义期间,可以指定新的可用性集。During customization, you can specify a new availability set.

重新保护期间会发生什么情况?What happens during reprotection?

默认会发生以下情况:By default, the following occurs:

  1. 在运行故障转移的 VM 的区域中创建一个缓存存储帐户。A cache storage account is created in the region where the failed over VM is running.
  2. 如果目标存储帐户(主要区域中的原始存储帐户)不存在,则会创建一个新帐户。If the target storage account (the original storage account in the primary region) doesn't exist, a new one is created. 分配的存储帐户名称是辅助 VM 使用的存储帐户名称,并带有后缀 asrThe assigned storage account name is the name of the storage account used by the secondary VM, suffixed with asr.
  3. 如果 VM 使用托管磁盘,则主要区域中会创建副本托管磁盘以存储从辅助 VM 磁盘中复制的数据。If your VM uses managed disks, replica managed disks are created in the primary region to store the data replicated from the secondary VM's disks.
  4. 如果目标可用性集不存在,将在执行重新保护作业期间根据需要新建一个可用性集。If the target availability set doesn't exist, a new one is created as part of the reprotect job if necessary. 如果已自定义重新保护设置,则会使用选定的可用性集。If you've customized the reprotection settings, then the selected set is used.

触发重新保护作业时,如果目标 VM 存在,则会发生以下情况:When you trigger a reprotect job, and the target VM exists, the following occurs:

  1. 关闭正在运行的目标端 VM。The target side VM is turned off if it's running.
  2. 如果 VM 使用托管磁盘,则会创建原始磁盘的带有 -ASRReplica 后缀的副本。If the VM is using managed disks, a copy of the original disk is created with an -ASRReplica suffix. 原始磁盘将被删除。The original disks are deleted. -ASRReplica 副本用于复制。The -ASRReplica copies are used for replication.
  3. 如果 VM 使用的是非托管磁盘,则会分离目标 VM 的数据磁盘并将其用于复制。If the VM is using unmanaged disks, the target VM's data disks are detached and used for replication. 将会创建 OS 磁盘的一个副本并将其附加到 VM 上。A copy of the OS disk is created and attached on the VM. 将分离原始 OS 磁盘并将其用于复制。The original OS disk is detached and used for replication.
  4. 仅同步源磁盘与目标磁盘之间的更改。Only changes between the source disk and the target disk are synchronized. 将通过比较两个磁盘来计算差异,然后传输这些差异。The differentials are computed by comparing both the disks and then transferred. 查看以下信息来确定完成重新保护所需的估算时间。Check below to find the estimated time to complete the reprotection.
  5. 同步完成后,将开始增量复制,并根据复制策略创建恢复点。After the synchronization completes, the delta replication begins, and a recovery point is created in line with the replication policy.

触发重新保护作业时,如果目标 VM 和磁盘不存在,则会发生以下情况:When you trigger a reprotect job, and the target VM and disks don't exist, the following occurs:

  1. 如果 VM 使用托管磁盘,则会创建带有 -ASRReplica 后缀的副本磁盘。If the VM is using managed disks, replica disks are created with -ASRReplica suffix. -ASRReplica 副本用于复制。The -ASRReplica copies are used for replication.
  2. 如果 VM 使用的是非托管磁盘,则会在目标存储帐户中创建副本磁盘。If the VM is using unmanaged disks, replica disks are created in the target storage account.
  3. 将全部磁盘从故障转移的区域复制到新的目标区域。The entire disks are copied from the failed over region to the new target region.
  4. 同步完成后,将开始增量复制,并根据复制策略创建恢复点。After the synchronization completes, the delta replication begins, and a recovery point is created in line with the replication policy.

估计的进行重新保护所需的时间Estimated time to do the reprotection

大多数情况下,Azure Site Recovery 不会将完整数据复制到源区域。In most cases, Azure Site Recovery doesn't replicate the complete data to the source region. 以下条件确定了复制的数据量:The following conditions determine how much data is replicated:

  1. 如果源 VM 数据因某种原因(例如资源组更改/删除)而被删除、受损或不可访问,则在重新保护期间会执行完整的初始复制,因为源区域没有可用数据。If the source VM data is deleted, corrupted, or inaccessible for some reason, such as a resource group change/delete, then during reprotection a complete initial replication will happen because there's no data available on the source region to use.
  2. 如果源 VM 数据可访问,则在比较两个磁盘时,只计算差异,然后传输这些差异。If the source VM data is accessible, then only differentials are computed by comparing both the disks and then transferred. 请查看下表获得估算的时间。Check the table below to get the estimated time.
示例场景Example situation 重新保护所需的时间Time taken to reprotect
源区域中有 1 个包含 1 TB 标准磁盘的 VMSource region has 1 VM with 1 TB standard disk.
仅使用了 127 GB 数据,磁盘的剩余存储是空的。Only 127 GB data is used, and the rest of the disk is empty.
磁盘类型为“标准”,吞吐量为 60 MBps。Disk type is standard with 60 MBps throughput.
故障转移后未发生数据更改。No data change after failover.
大约时间:60-90 分钟。Approximate time: 60-90 minutes.
在重新保护期间,Site Recovery 会填充所有数据的校验和。During reprotection, Site Recovery will populate the checksum of all data. 此操作以 45MBps 的速率运行,因此总共需要 127 GB/45 MBps 的时间(大约 45 分钟)。This operates at 45MBps, so the total time that it will take is 127 GB/45 MBps, approximately 45 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟。Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes.
源区域中有 1 个包含 1 TB 标准磁盘的 VMSource region has 1 VM with 1 TB standard disk.
仅使用了 127 GB 数据,磁盘的剩余存储是空的。Only 127 GB data is used and rest of the disk is empty.
磁盘类型为“标准”,吞吐量为 60 MBps。Disk type is standard with 60 MBps throughput.
故障转移后有 45 GB 的数据更改。45 GB data changes after failover.
大约时间:2.5-3 小时。Approximate time: 2.5-3 hours.
在重新保护期间,Site Recovery 会填充所有数据的校验和。During reprotection, Site Recovery will populate the checksum of all data. 此操作以 45MBps 的速率运行,因此总共需要 127 GB/45 MBps 的时间(大约 45 分钟)。This operates at 45MBps, so the total time that it will take is 127 GB/45 MBps, approximately 45 minutes.
传输速度约为吞吐量的 16%(即 9.6MBps)。Transfer speed is approximately 16% of throughput, or 9.6MBps. 因此,应用 45 GB 的更改所需的传输时间为 45 GB/9.6 MBps(大约 80 分钟)。Therefore, transfer time to apply changes of 45 GB that is 45 GB/9.6 MBps, approximately 80 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟。Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes.
源区域中有 1 个包含 1 TB 标准磁盘的 VMSource region has 1 VM with 1 TB standard disk.
仅使用了 20 GB 数据,磁盘的剩余存储为空。Only 20 GB data is used and rest of the disk is empty.
磁盘类型为“标准”,吞吐量为 60 MBps。Disk type is standard with 60 MBps throughput.
故障转移后,磁盘上的初始数据为 15 GB。The initial data on the disk immediately after failover was 15 GB. 故障转移后有 5 GB 数据更改。There was 5 GB data change after failover. 因此填充的数据总量为 20 GB。Total populated data is therefore 20 GB.
大约时间:1-1.5 小时。Approximate time: 1-1.5 hours.
由于磁盘中填充的数据小于磁盘大小的 10%,因此我们执行完整的初始复制。Since the data populated in the disk is less than 10% of the size of the disk, we perform a complete initial replication.
传输速度约为吞吐量的 16%(即 9.6MBps)。Transfer speed is approximately 16% of throughput, or 9.6MBps. 因此,应用 20 GB 的更改所需的传输时间为 20 GB/9.6 MBps(大约 36 分钟)。Therefore, transfer time to apply changes of 20 GB that is 20 GB/9.6 MBps, approximately 36 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟。Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes.
源区域中有 1 个包含 1 TB 高级磁盘的 VM。Source region has 1 VM with 1 TB premium disk.
仅使用了 127 GB 数据,磁盘的剩余存储是空的。Only 127 GB data is used, and the rest of the disk is empty.
磁盘类型为“高级”,吞吐量为 200 MBps。Disk type is premium with 200 MBps throughput.
故障转移后未发生数据更改。No data change after failover.
大约时间:2 小时。Approximate time: 2 hours.
在重新保护期间,Site Recovery 会填充所有数据的校验和。During reprotection, Site Recovery will populate the checksum of all data. 此操作以 25MBps(最高可达磁盘吞吐量的 16%)的速率运行,因此总共需要 127 GB/25 MBps 的时间(大约 87 分钟)。This operates at 25MBps (up to 16% of disk throughput), so the total time that it will take is 127 GB/25 MBps, approximately 87 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟。Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes.
源区域中有 1 个包含 1 TB 高级磁盘的 VM。Source region has 1 VM with 1 TB premium disk.
仅使用了 127 GB 数据,磁盘的剩余存储是空的。Only 127 GB data is used and rest of the disk is empty.
磁盘类型为“高级”,吞吐量为 200 MBps。Disk type is premium with 200 MBps throughput.
故障转移后有 45 GB 的数据更改。45 GB data changes after failover.
大约时间:2.5-3 小时。Approximate time: 2.5-3 hours.
在重新保护期间,Site Recovery 会填充所有数据的校验和。During reprotection, Site Recovery will populate the checksum of all data. 此操作以 25MBps(最高可达磁盘吞吐量的 16%)的速率运行,因此总共需要 127 GB/25 MBps 的时间(大约 87 分钟)。This operates at 25MBps (up to 16% of disk throughput), so the total time that it will take is 127 GB/25 MBps, approximately 87 minutes.
传输速度约为吞吐量的 16%(即 32MBps)。Transfer speed is approximately 16% of throughput, or 32MBps. 因此,应用 45 GB 的更改所需的传输时间为 45 GB/32 MBps(大约 24 分钟)。Therefore, transfer time to apply changes of 45 GB that is 45 GB/32 MBps, approximately 24 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟。Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes.
源区域中有 1 个包含 1 TB 高级磁盘的 VM。Source region has 1 VM with 1 TB premium disk.
仅使用了 20 GB 数据,磁盘的剩余存储为空。Only 20 GB data is used and rest of the disk is empty.
磁盘类型为“高级”,吞吐量为 200 MBps。Disk type is premium with 200 MBps throughput.
故障转移后,磁盘上的初始数据为 15 GB。The initial data on the disk immediately after failover was 15 GB. 故障转移后有 5 GB 数据更改。There was 5 GB data change after failover. 因此填充的数据总量为 20 GBTotal populated data is therefore 20 GB
大约时间:30-45 分钟。Approximate time: 30-45 minutes.
由于磁盘中填充的数据小于磁盘大小的 10%,因此我们执行完整的初始复制。Since the data populated in the disk is less than 10% of the size of the disk, we perform a complete initial replication.
传输速度约为吞吐量的 16%(即 32MBps)。Transfer speed is approximately 16% of throughput, or 32MBps. 因此,应用 20 GB 的更改所需的传输时间为 20 GB/32 MBps(大约 11 分钟)。Therefore, transfer time to apply changes of 20 GB that is 20 GB/32 MBps, approximately 11 minutes.
Site Recovery 进行自动缩放需要一些开销时间,大约为 20-30 分钟Some overhead time is required for Site Recovery to auto scale, approximately 20-30 minutes

在 VM 故障回复到主要区域后受到重新保护时(即,将 VM 从主要区域重新保护到 DR 区域),我们将删除目标 VM 和关联的 NIC。When the VM is re-protected after failing back to the primary region (i.e., if the VM is re-protected from primary region to DR region), the target VM and associated NIC(s) are deleted.

将 VM 从 DR 区域重新保护到主要区域时,我们不会删除以前的主 VM 和关联的 NIC。When the VM is re-protected from the DR region to the primary region, we do not delete the erstwhile primary VM and associated NIC(s).

后续步骤Next steps

保护 VM 后,可以启动故障转移。After the VM is protected, you can initiate a failover. 故障转移过程会关闭次要区域中的 VM,在主要区域中创建并启动 VM,这会出现短暂的停机。The failover shuts down the VM in the secondary region and creates and boots the VM in the primary region, with brief downtime during this process. 我们建议选择适当的时间完成此过程,并在完全故障转移到主站点之前运行测试故障转移。We recommend you choose an appropriate time for this process and that you run a test failover before initiating a full failover to the primary site. 详细了解 Azure Site Recovery 故障转移。Learn more about Azure Site Recovery failover.