为 Hyper-V 灾难恢复准备 Azure 资源Prepare Azure resources for Hyper-V disaster recovery

Azure Site Recovery 通过在计划内和计划外中断期间使商业应用保持运行状态,来帮助实现业务连续性和灾难恢复 (BCDR)。Azure Site Recovery helps business continuity and disaster recovery (BCDR) by keeping business apps running during planned and unplanned outages. Site Recovery 管理并安排本地计算机和 Azure 虚拟机 (VM) 的灾难恢复,包括复制、故障转移和恢复。Site Recovery manages and orchestrates disaster recovery of on-premises machines and Azure virtual machines (VMs), including replication, failover, and recovery.

本文是一部系列教程的第一篇文章,介绍如何为本地 Hyper-V VM 设置灾难恢复。This tutorial is the first in a series that describes how to set up disaster recovery for on-premises Hyper-V VMs.

备注

我们已编写相应的教程来介绍方案的最简单部署路径。We design tutorials to show the simplest deployment path for a scenario. 这些教程尽可能使用默认选项,并且不显示所有可能的设置和路径。These tutorials use default options when possible, and don't show all possible settings and paths. 有关详细信息,请参阅每个相应方案的“操作指南”部分。For more information, see the "How To" section for each corresponding scenario.

本教程介绍如何在将本地 VM (Hyper-V) 复制到 Azure 时准备 Azure 组件。This tutorial shows you how to prepare Azure components when you want to replicate on-premises VMs (Hyper-V) to Azure. 将了解如何执行以下操作:You'll learn how to:

  • 验证 Azure 帐户是否具有复制权限。Verify that your Azure account has replication permissions.
  • 创建一个 Azure 存储帐户用于存储复制的计算机的映像。Create an Azure storage account, which stores images of replicated machines.
  • 创建一个恢复服务保管库,用于存储 VM 和其他复制组件的元数据与配置信息。Create a Recovery Services vault, which stores metadata and configuration information for VMs and other replication components.
  • 设置 Azure 网络。Set up an Azure network. 在故障转移后创建的 Azure VM 将加入此网络。When Azure VMs are created after failover, they're joined to this network.

如果没有 Azure 订阅,可在开始前创建一个试用帐户If you don't have an Azure subscription, create a trial account before you begin.

登录Sign in

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

验证帐户权限Verify account permissions

如果你刚刚创建了一个 Azure 试用帐户,那么你就是该订阅的管理员。If you just created a trial Azure account, you're the administrator for that subscription. 如果你不是管理员,请要求管理员分配你所需的权限。If you're not the administrator, work with the administrator to assign the permissions you need. 若要为新虚拟机启用复制,必须有权执行以下操作:To enable replication for a new virtual machine, you must have permission to:

  • 在所选资源组中创建 VM。Create a VM in the selected resource group.
  • 在所选虚拟网络中创建 VM。Create a VM in the selected virtual network.
  • 向所选存储帐户进行写入。Write to the selected storage account.

若要完成这些任务,应为帐户分配“虚拟机参与者”内置角色。To complete these tasks, your account should be assigned the Virtual Machine Contributor built-in role. 若要在保管库中管理 Site Recovery 操作,应为帐户分配“Site Recovery 参与者”内置角色。To manage Site Recovery operations in a vault, your account should be assigned the Site Recovery Contributor built-in role.

创建存储帐户Create a storage account

已复制计算机的映像保存在 Azure 存储中。Images of replicated machines are held in Azure storage. 在从本地故障转移到 Azure 时,会从该存储中创建 Azure VM。Azure VMs are created from the storage when you fail over from on-premises to Azure. 存储帐户必须位于与恢复服务保管库相同的区域。The storage account must be in the same region as the Recovery Services vault.

  1. Azure 门户菜单中,选择“创建资源” > “存储” > “存储帐户”************。In the Azure portal menu, select Create a resource > Storage > Storage account.

  2. 在“创建存储帐户”中,输入帐户的名称。In Create storage account, enter a name for the account. 选择的名称必须在 Azure 中唯一,长度为 3 到 24 个字符,且只能使用小写字母和数字。The name you choose must be unique within Azure, be from 3 to 24 characters long, and only use lowercase letters and numbers. 本教程使用 contosovmsacct1910171607For this tutorial, use contosovmsacct1910171607.

  3. 在“部署模型”中,选择“资源管理器”。 In Deployment model, select Resource Manager.

  4. 在“帐户类型”中,选择“存储(常规用途 v1)” 。In Account kind, select Storage (general-purpose v1). 请不要选择 blob 存储。Don't select blob storage.

  5. 在“复制”中,选择默认的“读取访问异地冗余存储”作为存储冗余。 In Replication, select the default Read-access geo-redundant storage for storage redundancy. 将“需要安全传输”设置保留为“已禁用”。Leave the Secure transfer required setting as Disabled.

  6. 在“性能”中,选择“标准”。In Performance, select Standard. 接下来,在“访问层级”中选择默认选项“热”。 Next, in Access tier, select the default option of Hot.

  7. 在“订阅”中,选择要在其中创建新存储帐户的订阅。In Subscription, choose the subscription in which you want to create the new storage account.

  8. 在“资源组”中,输入新的资源组。In Resource group, enter a new resource group. Azure 资源组是在其中部署和管理 Azure 资源的逻辑容器。An Azure resource group is a logical container in which Azure resources are deployed and managed. 本教程使用 ContosoRGFor this tutorial, use ContosoRG.

  9. 在“位置”中,选择存储帐户的地理位置。In Location, choose the geographic location for your storage account. 本教程使用“中国北部”****。For this tutorial, use China North.

  10. 选择“创建”以创建存储帐户。Select Create to create the storage account.

    创建存储帐户选项的屏幕截图。

创建恢复服务保管库Create a recovery services vault

  1. 在 Azure 门户中选择“+创建资源”,然后在 Azure 市场中搜索“恢复服务”。In the Azure portal, select +Create a resource, and then search the Azure Marketplace for Recovery Services.

  2. 选择“备份和站点恢复(OMS)”。Select Backup and Site Recovery (OMS). 接下来,在“备份和站点恢复”页上,选择“创建”。 Next, on the Backup and Site Recovery page, select Create.

  3. 在“恢复服务保管库”>“名称”中,输入一个易记名称用于标识该保管库。In Recovery services vault > Name, enter a friendly name to identify the vault. 在本教程中,请使用 ContosoVMVault。For this tutorial, use ContosoVMVault.

  4. 资源组中,选择现有资源组或创建新资源组。In Resource group, select an existing resource group or create a new one. 本教程使用 contosoRGFor this tutorial, use contosoRG.

  5. 在“位置”中,选择该保管库要放到的区域。In Location, select the region where the vault should be located. 本教程使用“中国北部”****。For this tutorial, use China North.

  6. 若要从仪表板快速访问保管库,请选择“固定到仪表板” > “创建”。To quickly access the vault from the dashboard, select Pin to dashboard > Create.

    创建恢复服务保管库页的屏幕截图。

新保管库显示在“仪表板” > “所有资源”中,以及“恢复服务保管库”主页上。The new vault appears on Dashboard > All resources, and on the main Recovery Services vaults page.

设置 Azure 网络Set up an Azure network

在故障转移后创建的 Azure VM 会加入此网络。When Azure VMs are created from storage after failover, they're joined to this network.

  1. Azure 门户中,选择 “创建资源” > “网络” > “虚拟网络”In the Azure portal, select Create a resource > Networking > Virtual network. 保留选择“资源管理器”作为部署模型。Leave Resource Manager selected as the deployment model.

  2. 在“名称”中,输入网络名称。In Name, enter a network name. 名称在 Azure 资源组中必须唯一。The name must be unique within the Azure resource group. 本教程使用 ContosoASRnetFor this tutorial, use ContosoASRnet.

  3. 指定要在其中创建网络的资源组。Specify the resource group in which to create the network. 本教程使用现有资源组 contosoRGFor this tutorial, use the existing resource group contosoRG.

  4. 在“地址范围”中,输入 10.0.0.0/24 作为网络范围。In Address range, enter 10.0.0.0/24 as the range for the network. 此网络没有子网。There's no subnet for this network.

  5. 在“订阅”中,选择要在其中创建网络的订阅。In Subscription, select the subscription in which to create the network.

  6. 在“位置”中****,选择“中国北部”****。In Location, choose China North. 该网络必须位于与恢复服务保管库相同的区域中。The network must be in the same region as the Recovery Services vault.

  7. 选择“创建”。Select Create.

    创建虚拟网络选项的屏幕截图。

创建虚拟网络需要几秒钟的时间。The virtual network takes a few seconds to create. 创建后,可在 Azure 门户仪表板中看到它。After it's created, you'll see it in the Azure portal dashboard.

学习内容:Learn about:

后续步骤Next steps