将 VMware VM 故障回复到本地站点Fail back VMware VMs to on-premises site

本文介绍如何使用 Azure Site Recovery将 Azure VM 故障回复到本地站点,然后将本地 VM 故障转移到 Azure。This article describes how to fail back Azure VMs to an on-premises site, following failover of on-premises VMs to Azure with Azure Site Recovery. 故障回复到本地后启用复制,使本地 VM 开始复制到 Azure。After failback to on-premises, you enable replication so that the on-premises VMs start replicating to Azure.

开始之前Before you start

  1. 了解 VMware 故障回复Learn about VMware failback.
  2. 确保已查看并完成准备故障回复的步骤,并已部署全部所需的组件。Make sure you've reviewed and completed the steps to prepare for failback, and that all the required components are deployed. 组件包括 Azure 中的进程服务器、本地主目标服务器,以及用于故障回复的 VPN 站点到站点连接(或 ExpressRoute 专用对等互连)。Components include a process server in Azure, an on-premises master target server, and a VPN site-to-site connection (or ExpressRoute private peering) for failback.
  3. 确保符合重新保护和故障回复的要求,并已启用 Azure VM 的重新保护,以便从 Azure 复制到本地站点。Make sure you've completed the requirements for reprotection and failback, and that you've enabled reprotection of Azure VMs, so that they're replicating from Azure to the on-premises site. VM 必须处于已复制状态才能故障回复。VMs must be in a replicated state is order to fail back.

运行故障转移以进行故障回复Run a failover to fail back

  1. 确保 Azure VM 已重新受保护,并正在复制到本地站点。Make sure that Azure VMs are reprotected and replicating to the on-premises site.

    • VM 至少需有一个恢复点才能故障回复。A VM needs at least one recovery point in order to fail back.
    • 如果对恢复计划进行故障回复,该计划中的所有计算机应至少有一个恢复点。If you fail back a recovery plan, then all machines in the plan should have at least one recovery point.
  2. 在保管库中 >“复制的项”,选择 VM 。In the vault > Replicated items, select the VM. 右键单击该 VM 并选择“计划内故障转移” 。Right-click the VM > Unplanned Failover.

  3. 在“确认故障转移”中,确认故障转移方向为从 Azure 转移 。In Confirm Failover, verify the failover direction (from Azure).

  4. 选择要用于此故障转移的恢复点。Select the recovery point that you want to use for the failover.

    • 建议使用“最新”恢复点 。We recommend that you use the Latest recovery point. 应用一致性点会在最新的时间点之后,并会导致丢失部分数据。The app-consistent point is behind the latest point in time, and causes some data loss.
    • “最新”是崩溃一致性恢复点 。Latest is a crash-consistent recovery point.
    • 使用“最新”时,VM 将故障转移到其最新可用时间点。 With Latest, a VM fails over to its latest available point in time. 如果恢复计划中存在多 VM 一致性的复制组,该组中的每个 VM 将故障转移到其独立的最新时间点。If you have a replication group for multi-VM consistency within a recovery plan, each VM in the group fails over to its independent latest point in time.
    • 如果使用应用一致性恢复点,每个 VM 将故障回复到其最新可用时间点。If you use an app-consistent recovery point, each VM fails back to its latest available point. 如果恢复计划包含复制组,每个组将恢复到其公共的可用恢复点。If a recovery plan has a replication group, each group recovers to its common available recovery point.
  5. 故障转移开始。Failover begins. Site Recovery 关闭 Azure VM。Site Recovery shuts down the Azure VMs.

  6. 故障转移完成后,检查是否一切都符合预期。After failover completes, check everything's working as expected. 检查 Azure VM 是否已关闭。Check that the Azure VMs are shut down.

  7. 进行全面的验证后,右键单击 VM 并选择“提交”,以完成故障转移过程。 With everything verified, right-click the VM > Commit, to finish the failover process. “提交”操作会删除已故障转移的 Azure VM。Commit removes the failed-over Azure VM.

备注

对于 Windows VM,Site Recovery 在故障转移期间会禁用 VMware 工具。For Windows VMs, Site Recovery disables the VMware tools during failover. 在故障回复 Windows VM 期间,会再次启用 VMware 工具。During failback of the Windows VM, the VMware tools are enable again.

从本地到 Azure 进行重新保护Reprotect from on-premises to Azure

提交故障回复后,将删除 Azure VM。After committing the failback, the Azure VMs are deleted. VM 将返回到本地站点,但不受保护。The VM is back in the on-premises site, but it isn't protected. 可按如下所述开始将 VM 复制到 Azure:To start replicating VMs to Azure again,as follows:

  1. 在保管库中选择“复制的项”,选择已故障回复的 VM,然后选择“重新保护”。 In the vault > Replicated items, select failed back VMs, and then select Re-Protect.
  2. 指定用于将数据发回到 Azure 的进程服务器。Specify the process server that's used to send data back to Azure.
  3. 选择“确定”启动重新保护作业。 Select OK to begin the reprotect job.

备注

本地 VM 启动后,最多需要花费 15 分钟让代理重新注册到配置服务器。After an on-premises VM starts, it takes up to 15 minutes for the agent to register back to the configuration server. 在此期间,重新保护会失败并返回一条错误消息,指出未安装代理。During this time, reprotect fails and returns an error message stating that the agent isn't installed. 如果发生这种情况,请等待几分钟,然后再重新保护。If this occurs, wait for a few minutes, and reprotect.

后续步骤Next steps

重新保护作业完成后,本地 VM 将复制到 Azure。After the reprotect job finishes, the on-premises VM is replicating to Azure. 可根据需要再次运行到 Azure 的故障转移As needed, you can run another failover to Azure.