您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

将 ExpressRoute 关联的虚拟网络从经典部署模型迁移到 Resource Manager 部署模型Migrate ExpressRoute associated virtual networks from classic to Resource Manager

本文介绍如何在移动 ExpressRoute 线路后将 Azure ExpressRoute 关联的虚拟网络从经典部署模型迁移到 Azure Resource Manager 部署模型。This article explains how to migrate Azure ExpressRoute associated virtual networks from the classic deployment model to the Azure Resource Manager deployment model after moving your ExpressRoute circuit.

开始之前Before you begin

支持的和不支持的方案Supported and unsupported scenarios

  • 可以在不停机的情况下,将 ExpressRoute 线路从经典环境迁移到 Resource Manager 环境。An ExpressRoute circuit can be moved from the classic to the Resource Manager environment without any downtime. 可以在不停机的情况下,将 ExpressRoute 线路从经典环境转移到 Resource Manager 环境。You can move any ExpressRoute circuit from the classic to the Resource Manager environment with no downtime. 按照使用 PowerShell 将 ExpressRoute 线路从经典部署模型转移到 Resource Manager 部署模型中的说明进行操作。Follow the instructions in moving ExpressRoute circuits from the classic to the Resource Manager deployment model using PowerShell. 这是将连接的资源转移到虚拟网络的先决条件。This is a prerequisite to move resources connected to the virtual network.
  • 可以在不停机的情况下,将同一订阅中的虚拟网络、网关,以及附加到 ExpressRoute 线路的虚拟网络中的关联部署迁移到 Resource Manager 环境。Virtual networks, gateways, and associated deployments within the virtual network that are attached to an ExpressRoute circuit in the same subscription can be migrated to the Resource Manager environment without any downtime. 可以按照后面描述的步骤来迁移各种资源,例如虚拟网络、网关以及部署在虚拟网络中的虚拟机。You can follow the steps described later to migrate resources such as virtual networks, gateways, and virtual machines deployed within the virtual network. 必须确保虚拟网络配置正确,才能进行迁移。You must ensure that the virtual networks are configured correctly before they are migrated.
  • 若要完成虚拟网络、网关以及处于虚拟网络中但与 ExpressRoute 线路不属同一订阅的关联部署的迁移,则需停机一段时间。Virtual networks, gateways, and associated deployments within the virtual network that are not in the same subscription as the ExpressRoute circuit require some downtime to complete the migration. 文档最后一部分介绍了在迁移资源时必须执行的步骤。The last section of the document describes the steps to be followed to migrate resources.
  • 无法迁移使用 ExpressRoute 网关和 VPN 网关的虚拟网络。A virtual network with both ExpressRoute Gateway and VPN Gateway can't be migrated.

将 ExpressRoute 线路从经典部署模型转移到 Resource Manager 部署模型Move an ExpressRoute circuit from classic to Resource Manager

必须先将 ExpressRoute 线路从经典环境转移到 Resource Manager 环境,然后才能尝试迁移附加到 ExpressRoute 线路的资源。You must move an ExpressRoute circuit from the classic to the Resource Manager environment before you try to migrate resources that are attached to the ExpressRoute circuit. 若要完成此任务,请参阅以下文章:To accomplish this task, see the following articles:

此操作不涉及停机。This operation does not involve downtime. 只要迁移正在进行,就可以继续在本地和 Microsoft 之间传输数据。You can continue to transfer data between your premises and Microsoft while the migration is in progress.

迁移虚拟网络、网关和关联的部署Migrate virtual networks, gateways, and associated deployments

迁移所需步骤取决于资源是位于同一订阅中还是不同订阅中,还是两种情况都存在。The steps you follow to migrate depend on whether your resources are in the same subscription, different subscriptions, or both.

迁移与 ExpressRoute 线路属于同一订阅的虚拟网络、网关和关联的部署Migrate virtual networks, gateways, and associated deployments in the same subscription as the ExpressRoute circuit

此部分介绍了如何执行相关步骤,以便迁移与 ExpressRoute 线路属于同一订阅的虚拟网络、网关和关联的部署。This section describes the steps to be followed to migrate a virtual network, gateway, and associated deployments in the same subscription as the ExpressRoute circuit. 无需停机即可进行此迁移。No downtime is associated with this migration. 在整个迁移过程中,仍然可以使用所有资源。You can continue to use all resources through the migration process. 正在进行迁移时,管理平面是锁定的。The management plane is locked while the migration is in progress.

  1. 确保已将 ExpressRoute 线路从经典环境转移到 Resource Manager 环境。Ensure that the ExpressRoute circuit has been moved from the classic to the Resource Manager environment.
  2. 确保已针对迁移进行了相应的虚拟网络准备。Ensure that the virtual network has been prepared appropriately for the migration.
  3. 注册订阅,以便进行资源迁移。Register your subscription for resource migration. 若要针对资源迁移来注册订阅,请使用以下 PowerShell 代码片段:To register your subscription for resource migration, use the following PowerShell snippet:

    Select-AzureRmSubscription -SubscriptionName <Your Subscription Name>
    Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
    Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
    
  4. 验证、准备和迁移。Validate, prepare, and migrate. 若要转移虚拟网络,请使用以下 PowerShell 代码片段:To move the virtual network, use the following PowerShell snippet:

    Move-AzureVirtualNetwork -Validate -VirtualNetworkName $vnetName
    Move-AzureVirtualNetwork -Prepare -VirtualNetworkName $vnetName
    Move-AzureVirtualNetwork -Commit -VirtualNetworkName $vnetName
    

    也可通过运行以下 PowerShell cmdlet 来中止迁移:You can also abort migration by running the following PowerShell cmdlet:

    Move-AzureVirtualNetwork -Abort $vnetName
    

后续步骤Next steps