准备 Azure 资源,以便对本地计算机进行灾难恢复Prepare Azure resources for disaster recovery of on-premises machines

本文介绍如何准备 Azure 资源和组件,以便可以使用 Azure Site Recovery 服务设置本地 VMware VM、Hyper-V VM 或 Windows/Linux 物理服务器到 Azure 的灾难恢复。This article describes how to prepare Azure resources and components so that you can set up disaster recovery of on-premises VMware VMs, Hyper-V VMs, or Windows/Linux physical servers to Azure, using the Azure Site Recovery service.

本文是此系列的第一个教程,演示如何为本地 VM 设置灾难恢复。This article is the first tutorial in a series that shows you how to set up disaster recovery for on-premises VMs.

本教程介绍如何执行下列操作:In this tutorial, you learn how to:

  • 验证 Azure 帐户是否拥有复制权限。Verify that the Azure account has replication permissions.
  • 创建恢复服务保管库。Create a Recovery Services vault. 保管库保存 VM 和其他复制组件的元数据和配置信息。A vault holds metadata and configuration information for VMs, and other replication components.
  • 设置 Azure 虚拟网络 (VNet)。Set up an Azure virtual network (VNet). 在故障转移后创建的 Azure VM 将加入此网络。When Azure VMs are created after failover, they're joined to this network.

Note

教程中介绍了某个方案的最简单部署路径。Tutorials show you the simplest deployment path for a scenario. 它们尽可能使用默认选项,并且不显示所有可能的设置和路径。They use default options where possible, and don't show all possible settings and paths. 有关详细说明,请查看 Site Recovery 目录的“操作指南”部分所列的文章。For detailed instructions, review the article in the How To section of the Site Recovery Table of Contents.

开始之前Before you start

如果没有 Azure 订阅,可在开始前创建一个试用帐户If you don't have an Azure subscription, create a trial account before you begin. 然后登录到 Azure 门户Then sign in to the Azure portal.

验证帐户权限Verify account permissions

如果你刚刚创建了 Azure 试用帐户,那么你就是订阅的管理员,并拥有所需的权限。If you just created your trial Azure account, you're the administrator of your subscription and you have the permissions you need. 如果你不是订阅管理员,请要求管理员分配你所需的权限。If you're not the subscription 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.
  • 写入 Azure 存储帐户。Write to an Azure storage account.
  • 写入 Azure 托管磁盘。Write to an Azure managed disk.

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

创建恢复服务保管库Create a Recovery Services vault

  1. 在 Azure 门户中,选择“+ 创建资源” > “监视 + 管理” > “备份和站点恢复 (OMS)”。 In the Azure portal, select + Create a resource > Monitoring + Management > Backup and Site Recovery (OMS).

  2. 单击“备份和站点恢复(OMS)” ,然后在“备份和站点恢复”页中单击“创建” 。Click Backup and Site Recovery (OMS), and in the Backup and Site Recovery page, click Create.

  3. 在“恢复服务保管库” > “名称” 中,输入一个友好名称以标识此保管库。In Recovery Services vault > Name, enter a friendly name to identify the vault. 对于这组教程,我们使用 ContosoVMVaultFor this set of tutorials we're using ContosoVMVault.

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

  5. 位置中,选择保管库应位于的区域。In Location, select the region in which the vault should be located. 我们将使用“中国北部” 。We're using 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 托管磁盘。On-premises machines are replicated to Azure managed disks. 故障转移时,Azure VM 将从这些托管磁盘创建,并加入到在此过程中指定的 Azure 网络。When failover occurs, Azure VMs are created from these managed disks, and joined to the Azure network you specify in this procedure.

  1. Azure 门户中,选择“创建资源” > “网络” > “虚拟网络”。In the Azure portal, select Create a resource > Networking > Virtual network.

  2. 选择“资源管理器”作为部署模型 。Keep Resource Manager selected as the deployment model.

  3. 在“名称”中 ,输入网络名称。In Name, enter a network name. 名称在 Azure 资源组中必须唯一。The name must be unique within the Azure resource group. 在本教程中我们将使用 ContosoASRnetWe're using ContosoASRnet in this tutorial.

  4. 指定将在其中创建网络的资源组。Specify the resource group in which the network will be created. 我们将使用现有资源组 contosoRG 。We're using the existing resource group contosoRG.

  5. 在“地址范围” 中,输入网络的范围。In Address range, enter the range for the network. 我们将使用 10.1.0.0/24,而不使用子网 。We're using 10.1.0.0/24, and not using a subnet.

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

  7. 在“位置”中,选择创建了恢复服务保管库的同一个区域 。In Location, select the same region as that in which the Recovery Services vault was created. 本教程使用“中国北部” 。In our tutorial it's China North. 该网络必须位于与保管库相同的区域中。The network must be in the same region as the vault.

  8. 单击创建Click Create.

    创建虚拟网络

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

后续步骤Next steps