关于 VMware VM 到 Azure 的灾难恢复About disaster recovery of VMware VMs to Azure

本文概述了使用 Azure Site Recovery 服务执行从本地 VMware VM 到 Azure 的灾难恢复。This article provides an overview of disaster recovery for on-premises VMware VMs to Azure using the Azure Site Recovery service.

什么是 BCDR?What is BCDR?

业务连续性和灾难恢复 (BCDR) 策略有助于保持业务正常运行。A business continuity and disaster recovery (BCDR) strategy helps keep your business up and running. 在计划的停机和意外故障期间,BCDR 可确保数据安全可用,并确保应用继续运行。During planned downtime and unexpected outages, BCDR keeps data safe and available, and ensures that apps continue running. 除了区域配对和高可用性存储等平台 BCDR 功能外,Azure 还提供恢复服务作为 BCDR 解决方案的一个主要部分。In addition to platform BCDR features such as regional pairing, and high availability storage, Azure provides Recovery Services as an integral part of your BCDR solution. 恢复服务包括以下功能:Recovery services include:

  • Azure 备份可备份用户的本地和 Azure VM 数据。Azure Backup backs up your on-premises and Azure VM data. 用户可以备份文件和文件夹、特定工作负载或整个 VM。You can back up a file and folders, specific workloads, or an entire VM.
  • Azure Site Recovery 为在本地计算机或 Azure IaaS VM 上运行的应用和工作负载提供恢复能力和灾难恢复。Azure Site Recovery provides resilience and disaster recovery for apps and workloads running on on-premises machines, or Azure IaaS VMs. Site Recovery 协调复制,并在发生中断时处理到 Azure 的故障转移。Site Recovery orchestrates replication, and handles failover to Azure when outages occur. 它还处理从 Azure 到主站点的恢复。It also handles recovery from Azure to your primary site.


Site Recovery 不会将客户数据移到或存储在目标区域之外,目标区域中已为源计算机设置了灾难恢复。Site Recovery does not move or store customer data out of the target region, in which disaster recovery has been setup for the source machines. 如果客户愿意,可以从其他地区选择恢复服务保管库。Customers may select a Recovery Services Vault from a different region if they so choose. 恢复服务保管库包含元数据,但不包含实际的客户数据。The Recovery Services Vault contains metadata but no actual customer data.

Site Recovery 如何进行灾难恢复?How does Site Recovery do disaster recovery?

  1. 准备 Azure 和本地站点后,可以为本地计算机设置并启用复制。After preparing Azure and your on-premises site, you set up and enable replication for your on-premises machines.
  2. Site Recovery 根据你的策略设置协调计算机的初始复制。Site Recovery orchestrates initial replication of the machine, in accordance with your policy settings.
  3. 完成初始复制后,Site Recovery 将增量更改复制到 Azure。After the initial replication, Site Recovery replicates delta changes to Azure.
  4. 当所有内容按预期复制时,可以运行灾难恢复钻取。When everything's replicating as expected, you run a disaster recovery drill.
    • 钻取有助于确保在真正需要时,故障转移将按预期工作。The drill helps ensure that failover will work as expected when a real need arises.
    • 钻取执行测试故障转移时,不会影响你的生产环境。The drill performs a test failover without impacting your production environment.
  5. 如果发生中断,则运行到 Azure 的完全故障转移。If an outage occurs, you run a full failover to Azure. 可以对单台计算机进行故障转移,也可以创建一个恢复计划,同时在多台计算机上进行故障转移。You can fail over a single machine, or you can create a recovery plan that fails over multiple machines at the same time.
  6. 故障转移时,将使用托管磁盘或存储帐户中的 VM 数据创建 Azure VM。On failover, Azure VMs are created from the VM data in Managed disks or storage accounts. 用户可以继续从 Azure VM 访问应用和工作负载Users can continue accessing apps and workloads from the Azure VM
  7. 当本地站点再次可用时,便可从 Azure 进行故障回复。When your on-premises site is available again, you fail back from Azure.
  8. 在进行故障回复并再次从主站点正常工作后,将再次开始将本地 VM 复制到 Azure。After you fail back and are working from your primary site once more, you start replicating on-premises VMs to Azure again.

我如何知道我的环境是否适合灾难恢复到 Azure?How do I know if my environment is suitable for disaster recovery to Azure?

Site Recovery 可复制受支持的 VMware VM 或物理服务器上运行的任何工作负载。Site Recovery can replicate any workload running on a supported VMware VM or physical server. 以下是需要在环境中检查的内容:Here are the things you need to check in your environment:

  • 如果要复制 VMware VM,是否运行了正确版本的 VMware 虚拟化服务器?If you're replicating VMware VMs, are you running the right versions of VMware virtualization servers? 查看此文Check here.
  • 要复制的计算机是否运行支持的操作系统?Are the machines you want to replicate running a supported operating system? 查看此文Check here.
  • 对于 Linux 灾难恢复,计算机是否运行支持的文件系统/来宾存储?For Linux disaster recovery, are machines running a supported file system/guest storage? 查看此文Check here
  • 要复制的计算机是否符合 Azure 要求?Do the machines you want to replicate comply with Azure requirements? 查看此文Check here.
  • 网络配置是否受支持?Is your network configuration supported? 查看此文Check here.
  • 存储配置是否受支持?Is your storage configuration supported? 查看此文Check here.

在开始之前,我需要在 Azure 中设置什么?What do I need to set up in Azure before I start?

在 Azure 中需要准备以下内容:In Azure you need to prepare the following:

  1. 验证 Azure 帐户是否具有在 Azure 中创建 VM 的权限。Verify that your Azure account has permissions to create VMs in Azure.
  2. 创建一个 Azure 网络,在故障转移后从存储帐户或托管磁盘创建 Azure VM 时,此 Azure VM 将加入该网络。Create an Azure network that Azure VMs will join when they're created from storage accounts or managed disks after failover.
  3. 为 Site Recovery 设置 Azure 恢复服务保管库。Set up an Azure Recovery Services vault for Site Recovery. 保管库位于 Azure 门户中,用于部署、配置、协调、监视和排查 Site Recovery 部署的故障。The vault resides in the Azure portal, and is used to deploy, configure, orchestrate, monitor, and troubleshoot your Site Recovery deployment.

需要更多帮助?Need more help?

了解如何通过验证帐户、创建网络设置保管库来设置 Azure。Learn how to set up Azure by verifying your account, creating a network, and setting up a vault.

在开始之前,我需要在本地设置什么?What do I need to set up on-premises before I start?

下面是需要在本地进行的设置:On-premises here's what you need to do:

  1. 需要设置几个帐户:You need to set up a couple of accounts:

    • 如果要复制 VMware VM,则 Site Recovery 需要一个帐户才能访问 vCenter Server 或 vSphere ESXi 主机以自动发现 VM。If you're replicating VMware VMs, an account is needed for Site Recovery to access vCenter Server or vSphere ESXi hosts to automatically discover VMs.
    • 需要一个帐户才能在要复制的每台物理计算机或 VM 上安装 Site Recovery 移动服务代理。An account is needed to install the Site Recovery Mobility service agent on each physical machine or VM you want to replicate.
  2. 如果以前没有这样做,则需要检查 VMware 基础架构的兼容性。You need to check the compatibility of your VMware infrastructure if you didn't previously do that.

  3. 确保可以在故障转移后连接到 Azure VM。Ensure that you can connect to Azure VMs after a failover. 在本地 Windows 计算机上设置 RDP,或在 Linux 计算机上设置 SSH。You set up RDP on on-premises Windows machines, or SSH on Linux machines.

需要更多帮助?Need more help?

如何设置灾难恢复?How do I set up disaster recovery?

在 Azure 和本地基础结构就位后,可以设置灾难恢复。After you have your Azure and on-premises infrastructure in place, you can set up disaster recovery.

  1. 若要了解需要部署的组件,请查看 VMware 到 Azure 体系结构,以及物理机到 Azure 体系结构To understand the components that you'll need to deploy, review the VMware to Azure architecture, and the physical to Azure architecture. 其中包含许多组件,请务必了解它们如何搭配在一起。There are a number of components, so it's important to understand how they all fit together.
  2. 源环境****:作为部署中的第一步,需要设置复制源环境。Source environment: As a first step in deployment, you set up your replication source environment. 指定要复制的内容以及要复制到的位置。You specify what you want to replicate, and where you want to replicate to.
  3. 配置服务器****:需要设置本地源环境中的配置服务器:Configuration server: You need to set up a configuration server in your on-premises source environment:
    • 配置服务器是一台本地计算机。The configuration server is a single on-premises machine. 对于 VMware 灾难恢复,建议将其作为可通过可下载的 OVF 模板部署的 VMware VM 来部署。For VMware disaster recovery, we recommend that you deploy it as a VMware VM that can be deployed from a downloadable OVF template.
    • 配置服务器协调本地环境与 Azure 之间的通信The configuration server coordinates communications between on-premises and Azure
    • 其他几个组件在配置服务器计算机上运行。A couple of other components run on the configuration server machine.
      • 进程服务器接收、优化复制数据并将复制数据发送到 Azure 中的缓存存储帐户。The process server receives, optimizes, and sends replication data to cache storage account in Azure. 它还会处理要复制的计算机上的移动服务的自动安装,并在 VMware 服务器上执行 VM 的自动发现。It also handles automatic installation of the Mobility service on machines you want to replicate, and performs automatic discovery of VMs on VMware servers.
      • 主目标服务器处理从 Azure 进行故障回复期间产生的复制数据。The master target server handles replication data during failback from Azure.
    • 设置过程包括在保管库中注册配置服务器、下载 MySQL Server 和 VMware PowerCLI,以及指定为自动发现和移动服务安装所创建的帐户。Set up includes registering the configuration server in the vault, downloading MySQL Server and VMware PowerCLI, and specifying the accounts created for automatic discovery and Mobility service installation.
  4. 目标环境:通过指定 Azure 订阅和网络设置来设置目标 Azure 环境。Target environment: You set up your target Azure environment by specifying your Azure subscription and network settings.
  5. 复制策略****:指定复制的方式。Replication policy: You specify how replication should occur. 设置包括创建和存储恢复点的频率,以及是否应创建应用一致性快照。Settings include how often recovery points are created and stored, and whether app-consistent snapshots should be created.
  6. 启用复制Enable replication. 为本地计算机启用复制。You enable replication for on-premises machines. 如果你创建了一个帐户用于安装移动服务,则在为计算机启用复制时将进行安装。If you created an account to install the Mobility service, then it will be installed when you enable replication for a machine.

需要更多帮助?Need more help?

出现了问题,如何解决?Something went wrong, how do I troubleshoot?

  • 第一步,请尝试监视部署,验证已复制项、作业和基础结构问题的状态,并确定所有错误。As a first step, try monitoring your deployment to verify the status of replicated items, jobs, and infrastructure issues, and identify any errors.
  • 如果无法完成初始复制,或者正在进行的复制未按预期工作,请查看本文,了解常见错误和故障排查提示。If you're unable to complete the initial replication, or ongoing replication isn't working as expected, review this article for common errors and troubleshooting tips.
  • 如果在要复制的计算机上自动安装移动服务时遇到问题,请查看本文中的常见错误。If you're having issues with the automatic installation of the Mobility service on machines you want to replicate, review common errors in this article.
  • 如果故障转移未按预期工作,请查看本文中的常见错误。If failover isn't working as expected, check common errors in this article.
  • 如果故障恢复无法正常运行,请检查问题是否出现在本文中。If failback isn't working, check whether your issue appears in this article.

后续步骤Next steps

现在复制已准备就绪,应运行灾难恢复钻取以确保故障转移按预期工作。With replication now in place, you should run a disaster recovery drill to ensure that failover works as expected.