对复制到辅助本地站点的 Hyper-V VM 进行故障转移和故障回复Fail over and fail back Hyper-V VMs replicated to your secondary on-premises site

Azure Site Recovery 服务可管理和协调本地计算机和 Azure 虚拟机 (VM) 的复制、故障转移和故障回复。The Azure Site Recovery service manages and orchestrates replication, failover, and failback of on-premises machines, and Azure virtual machines (VMs).

本文介绍如何将 System Center Virtual Machine Manager (VMM) 云中托管的 Hyper-V VM 故障转移到辅助 VMM 站点。This article describes how to fail over a Hyper-V VM managed in a System Center Virtual Machine Manager (VMM) cloud, to a secondary VMM site. 故障转移后,可故障回复到本地站点(若可行)。After you've failed over, you fail back to your on-premises site when it's available. 在本文中,学习如何:In this article, you learn how to:

  • 将 Hyper-V VM 从主 VMM 云故障转移到辅助 VMM 云Fail over a Hyper-V VM from a primary VMM cloud to a secondary VMM cloud
  • 从辅助站点重新保护到主站点,并进行故障回复Reprotect from the secondary site to the primary, and fail back
  • (可选)再次开始从主站点复制到辅助站点Optionally start replicating from primary to secondary again

故障转移和故障回复Failover and failback

故障转移和故障回复具有三个阶段:Failover and failback has three stages:

  1. 故障转移到辅助站点:将计算机从主站点故障转移到辅助站点。Fail over to secondary site: Fail machines over from the primary site to the secondary.
  2. 从辅助站点故障回复:将 VM 从辅助站点复制到主站点,并运行计划的故障转移以进行故障回复。Fail back from the secondary site: Replicate VMs from secondary to primary, and run a planned failover to fail back.
  3. 在计划的故障转移之后,可以选择再次开始从主站点复制到辅助站点。After the planned failover, optionally start replicating from the primary site to the secondary again.

先决条件Prerequisites

  • 确保已完成灾难恢复演练,检查所有内容是否都按预期工作。Make sure you've completed a disaster recovery drill to check that everything's working as expected.
  • 若要完成故障回复,请确保主和辅助 VMM 服务器已连接到 Site Recovery。To complete failback, make sure that the primary and secondary VMM servers are connected to Site Recovery.

运行从主站点到辅助站点的故障转移Run a failover from primary to secondary

可以为 Hyper-V VM 运行常规或计划的故障转移。You can run a regular or planned failover for Hyper-V VMs.

  • 使用常规故障转移处理意外中断。Use a regular failover for unexpected outages. 当运行此故障转移时,Site Recovery 会在辅助站点中创建一个 VM,并将其启动。When you run this failover, Site Recovery creates a VM in the secondary site, and powers it up. 根据未同步的挂起数据,可能会丢失数据。Data loss can occur depending on pending data that hasn't been synchronized.
  • 可在维护或预期中断过程中使用计划内故障转移。A planned failover can be used for maintenance, or during expected outage. 此选项保证无数据丢失。This option provides zero data loss. 触发计划内故障转移时,关闭源 VM。When a planned failover is triggered, the source VMs are shut down. 同步未同步的数据,并触发故障转移。Unsynchronized data is synchronized, and the failover is triggered.

本过程介绍如何运行常规故障转移。This procedure describes how to run a regular failover.

  1. 在“受保护的项” > “复制的项” 中,单击 VM >“故障转移” 。In Protected items > Replicated items click the VM > Failover.

  2. 如果希望 Site Recovery 在触发故障转移之前尝试关闭源 VM,请选择“在开始故障转移前关闭计算机” 。Select Shut down machine before beginning failover if you want Site Recovery to attempt to do a shutdown of source VMs before triggering the failover. 在触发故障转移前,Site Recovery 还会尝试同步尚未发送到辅助站点的本地数据。Site Recovery will also try to synchronize on-premises data that hasn't yet been sent to the secondary site, before triggering the failover. 请注意:即使关机失败,故障转移也仍会继续。Note that failover continues even if shutdown fails. 可以在“作业” 页上跟踪故障转移进度。You can follow the failover progress on the Jobs page.

  3. 你现在应能够在辅助 VMM 云中看到 VM。You should now be able to see the VM in the secondary VMM cloud.

  4. 验证 VM 后,“提交” 故障转移。After you verify the VM, Commit the failover. 这会删除所有可用的恢复点。This deletes all the available recovery points.

Warning

请勿取消正在进行的故障转移:在故障转移开始前,VM 复制已停止。Don't cancel a failover in progress: Before failover is started, VM replication is stopped. 如果取消正在进行的故障转移,故障转移会停止,但 VM 将不再进行复制。If you cancel a failover in progress, failover stops, but the VM won't replicate again.

反向复制和故障转移Reverse replicate and failover

开始从辅助站点复制到主站点,并故障回复到主站点。Start replicating from the secondary site to the primary, and fail back to the primary site. VM 在主站点中再次运行之后,可以将它们复制到辅助站点。After VMs are running in the primary site again, you can replicate them to the secondary site.

  1. 单击“VM”> 单击 “反向复制”。Click the VM > click on Reverse Replicate.
  2. 在完成作业后,单击“VM”,在“故障转移” 中确认故障转移方向(从辅助 VMM 云),并选择源和目标位置。Once the job is complete, click the VM >In Failover, verify the failover direction (from secondary VMM cloud), and select the source and target locations.
  3. 启动故障转移。Initiate the failover. 可以在“作业”选项卡上跟踪故障转移进度。You can follow the failover progress on the Jobs tab.
  4. 在主 VMM 云中,检查 VM 是否可用。In the primary VMM cloud, check that the VM is available.
  5. 如果要再次开始将主 VM 复制回辅助站点,请单击“反向复制” 。If you want to start replicating the primary VM back to the secondary site again, click on Reverse Replicate.

后续步骤Next steps

查看将 Hyper-V VM 复制到辅助站点的步骤Review the step for replicating Hyper-V VMs to a secondary site.