快速入门:为 Azure VM 设置到 Azure 次要区域的灾难恢复Quickstart: Set up disaster recovery to a secondary Azure region for an Azure VM

Azure Site Recovery 服务通过在计划内和计划外中断期间使商业应用程序保持联机状态,有助于实施业务连续性和灾难恢复 (BCDR) 策略。The Azure Site Recovery service contributes to your business continuity and disaster recovery (BCDR) strategy by keeping your business applications online during planned and unplanned outages. Site Recovery 管理并安排本地计算机和 Azure 虚拟机 (VM) 的灾难恢复,包括复制、故障转移和恢复。Site Recovery manages and orchestrates disaster recovery of on-premises machines and Azure virtual machines (VM), including replication, failover, and recovery.

本快速入门介绍了如何通过将 Azure VM 复制到次要 Azure 区域来为其设置灾难恢复。This quickstart describes how to set up disaster recovery for an Azure VM by replicating it to a secondary Azure region. 通常,使用默认设置来启用复制。In general, default settings are used to enable replication.

先决条件Prerequisites

需要 Azure 订阅和 VM 才能完成此教程。To complete this tutorial, you need an Azure subscription and a VM.

登录 AzureSign in to Azure

登录 Azure 门户Sign in to the Azure portal.

为 Azure VM 启用复制Enable replication for the Azure VM

执行以下步骤可将 VM 复制到次要位置。The following steps enable VM replication to a secondary location.

  1. 在 Azure 门户上,从“主页” > “虚拟机”菜单中选择要复制的 VM。On the Azure portal, from Home > Virtual machines menu, select a VM to replicate.

  2. 在“操作”中,选择“灾难恢复” 。In Operations select Disaster recovery.

  3. 从“基本信息” > “目标区域”中,选择目标区域。From Basics > Target region, select the target region.

  4. 若要查看复制设置,请选择“查看 + 开始复制” 。To view the replication settings, select Review + Start replication. 如需更改任何默认设置,请选择“高级设置” 。If you need to change any defaults, select Advanced settings.

  5. 若要启动启用 VM 复制的作业,请选择“启动复制” 。To start the job that enables VM replication select Start replication.

    启用复制。

验证设置Verify settings

复制作业完成后,可以检查复制状态、修改复制设置和测试部署。After the replication job finishes, you can check the replication status, modify replication settings, and test the deployment.

  1. 在 Azure 门户菜单中选择“虚拟机” ,然后选择已复制的 VM。On the Azure portal menu, select Virtual machines and select the VM that you replicated.

  2. 在“操作”中,选择“灾难恢复” 。In Operations select Disaster recovery.

  3. 若要查看“概览”中的复制详细信息, 请选择“基本信息” 。To view the replication details from the Overview select Essentials. 更多详细信息显示在“运行状况和状态” 、“故障转移就绪情况”和“基础结构视图”映射中。 More details are shown in the Health and status, Failover readiness, and the Infrastructure view map.

    复制状态。

清理资源Clean up resources

若要停止对主要区域中 VM 的复制,必须禁用复制:To stop replication of the VM in the primary region, you must disable replication:

  • 将自动清除源复制设置。The source replication settings are cleaned up automatically.
  • 在复制过程中安装在 VM 上的 Site Recovery 扩展不会被删除。The Site Recovery extension installed on the VM during replication isn't removed.
  • 对 VM 的 Site Recovery 计费会停止。Site Recovery billing for the VM stops.

若要禁用复制,请执行以下步骤:To disable replication, do these steps:

  1. 在 Azure 门户菜单中选择“虚拟机” ,然后选择已复制的 VM。On the Azure portal menu, select Virtual machines and select the VM that you replicated.

  2. 在“操作”中,选择“灾难恢复” 。In Operations select Disaster recovery.

  3. 从“概览”中选择“禁用复制” 。 From the Overview, select Disable Replication.

  4. 若要卸载 Site Recovery 扩展,请转到 VM 的“设置” > “扩展”。 To uninstall the Site Recovery extension, go to the VM's Settings > Extensions.

    禁用复制。

后续步骤Next steps

在本快速入门中,将单个 VM 复制到了次要区域。In this quickstart, you replicated a single VM to a secondary region. 接下来,为多个 Azure VM 设置复制。Next, set up replication for multiple Azure VMs.