关于移动过程About the move process

Azure 资源转移器帮助你在 Azure 区域之间移动 Azure 资源。Azure Resource Mover helps you to move Azure resources across Azure regions. 本文总结了资源转移器使用的组件,并介绍了移动过程。This article summarizes the components used by Resource Mover, and describes the move process.

组件Components

在区域移动期间将使用这些组件。These components are used during region move.

组件Component 详细信息Details
资源转移器Resource Mover 资源转移器与 Azure 资源提供程序进行协调来安排资源在区域之间的移动。Resource Mover coordinates with Azure resource providers to orchestrate the move of resources between regions. 资源转移器分析资源依赖关系,并在移动过程中维护和管理资源的状态。Resource Mover analyzes resource dependencies, and maintains and manages the state of resources during the move process.
移动集合Move collection 移动集合是一个 Azure 资源管理器对象。A move collection is an Azure Resource Manager object.

移动集合是在区域移动过程中针对订阅中每个包含源区域和目标区域的配对组合创建的。The move collection is created during the region move process, for each paired combination of source and target regions in a subscription. 该集合包含要移动的资源的元数据和配置信息。The collection contains metadata and configuration information about the resources you want to move.

添加到移动集合的资源必须在同一订阅中,但可以在不同的资源组中。Resources added to a move collection must be in the same subscription, but can be in different resource groups.
移动资源Move resource 向移动集合添加资源时,资源转移器会将资源作为移动资源进行跟踪。When you add a resource to a move collection, it's tracked by Resource Mover as a move resource.

资源转移器维护移动集合中的所有移动资源的信息,并维护源资源与目标资源之间的一对一关系。Resource Mover maintains information for all of the move resources in the move collection, and maintains a one-to-one relationship between the source and target resource.
依赖项Dependencies 资源转移器验证你添加到集合的资源,并检查资源是否有任何不在移动集合中的依赖项。Resource Mover validates resources that you add to a collection, and checks whether resources have any dependencies that aren't in the move collection.

确定资源的依赖项后,可以将它们的依赖项添加到移动集合并移动它们,也可以选择目标区域中的现有替代资源。After identifying dependencies for a resource, you can either add them dependencies to the move collection and move them too, or you can select alternate existing resources in the target region. 开始移动之前,必须先解决所有依赖项。All dependencies must be resolved before you start the move.

移动区域过程Move region process

显示了移动步骤的示意图

每个移动资源都会经历所概述的步骤。Each move resource goes through the summarized steps.

步骤Step 详细信息Details 状态/问题State/Issues
步骤 1:选择资源Step 1: Select resources 选择资源。Select a resource. 资源将添加到移动集合中。The resource is added to the move collection. 资源状态会变为“待准备”。Resource state moves to Prepare pending.

如果资源具有依赖项,则“验证依赖项”会指示你需要向移动集合添加依赖项资源。If the resource has dependencies, Validate dependency indicates that you need to add dependent resources to the move collection.
步骤 2:验证依赖项Step 2: Validate dependencies 启动验证过程。Kick off the validation process.

如果验证显示依赖项资源处于挂起状态,请将其添加到移动集合。If validation shows that dependent resources are pending, add them to the move collection.

请添加所有依赖项资源,即使你不想移动它们。Add all dependent resources, even if you don't want to move them. 你稍后可以指出,要移动的资源应改用目标区域中的不同资源。You can later specify that the resources you're moving should use different resources in the target region instead.

请再次验证,直到没有待定依赖项为止。You validate again, until there are no outstanding dependencies.
添加所有依赖项并成功验证后,资源状态会变为“待准备”,而不会出现任何问题。After all dependencies are added and validation succeeds, resource state moves to Prepare pending, without any issues.
步骤 3:准备Step 3: Prepare 启动准备过程。Kick off the prepare process. 准备步骤取决于要移动的资源:Preparation steps depend on the resources you're moving:

- 无状态资源:无状态资源仅具有配置信息。- Stateless resources: Stateless resources have configuration information only. 这些资源不需要连续复制数据来移动数据。These resources don't need continuous replication of data in order to move them. 示例包括:Azure 虚拟网络 (VNet)、网络适配器、负载均衡器和网络安全组。Examples include Azure virtual networks (VNets), network adapters, load balancers, and network security groups. 对于这种类型的资源,准备过程会生成一个 Azure 资源管理器模板。For this type of resource, the Prepare process generates an Azure Resource Manager template.

- 有状态资源:有状态资源既包含配置信息,又包含需要移动的数据。- Stateful resources: Stateful resources have both configuration information, and data that needs to be moved. 示例包括 Azure VM 和 Azure SQL 数据库。Examples include Azure VMs, and Azure SQL databases. 每个资源的准备过程不同。The Prepare process differs for each resource. 它可能包括将源资源复制到目标区域。It might include replicating the source resource to the target region.
启动会将资源状态变为“正在准备”。Kicking off moves resource state to Prepare in progress.

准备完成后,资源状态会变为“待启动移动”,不会出现问题。After prepare finishes, resource state moves to Initiate move pending, with no issues.

如果过程不成功,则状态会变为“准备失败”。An unsuccessful process moves state to Prepare failed.
步骤 4:启动移动Step 4: Initiate move 启动移动过程。Kick off the move process. 移动方法取决于资源类型:The move method depends on the resource type:

- 无状态:通常,对于无状态资源,移动过程会在目标区域中部署导入的模板。- Stateless: Typically, for stateless resources, the move process deploys an imported template in the target region. 此模板基于源资源设置,以及你对目标设置进行的任何手动编辑。The template is based on the source resource settings, and any manual edits you make to target settings.

- 有状态:对于有状态资源,移动过程可能涉及在目标区域中创建资源或启用副本。- Stateful: For stateful resources, the move process might involve creating the resource, or enabling a copy, in the target region.

启动移动可能会导致源资源停机(仅适用于有状态资源)。For stateful resources only, initiating a move might result in downtime of source resources. 例如,VM 和 SQL。For example, VMs and SQL.
启动移动会将状态转变为“正在启动移动”。Kicking off move shifts the state to Initiate move in progress.

如果启动移动成功,则会将资源状态变为“待提交移动”,不会出现问题。A successful initiate move moves resource state to Commit move pending, with no issues.

如果移动过程不成功,则状态会变为“启动移动失败”。An unsuccessful move process moves state to Initiate move failed.
步骤 5 选项 1:放弃移动Step 5 Option 1: Discard move 在初始移动后,你可以决定是否继续进行完整移动。After the initial move, you can decide whether you want to go ahead with a full move. 如果不继续,你可以放弃移动,资源转移器会删除在目标中创建的资源。If you don't, you can discard the move, and Resource Mover deletes the resources created in the target. 在放弃过程之后,有状态资源的复制过程会继续。The replication process for stateful resources continues after the Discard process. 此选项可用于测试。This option is useful for testing. 放弃资源会将状态变为“正在放弃”。Discarding resources moves state to Discard in progress.

如果成功放弃,则会将状态变为“待启动移动”,不会出现问题。Successful discard moves state to Initiate move pending, with no issues.

如果放弃失败,则会将状态变为“放弃移动失败”。A failed discard moves state to Discard move failed.
步骤 5 选项 2:提交移动Step 5 Option 2: Commit move 在初始移动后,如果要继续进行完整移动,请验证目标区域中的资源,并在准备就绪后提交移动。After the initial move, if you want to go ahead with a full move, you verify resources in the target region, and when you're ready, you commit the move.

提交可能会导致源资源(例如 VM 或 SQL)变得无法访问(仅适用于有状态资源)。For stateful resources only, commit can result in source resources like VMs or SQL becoming inaccessible.
如果提交移动,则资源状态会变为“正在提交移动”***。If you commit the move, resource state moves to *Commit move in progress**.

如果成功提交,则资源状态会显示为“提交移动完成”,不会出现问题。After a successful commit, the resource state shows Commit move completed, with no issues.

提交失败会将状态变为“提交移动失败”。A failed commit moves state to Commit move failed.
步骤 6:删除源Step 6: Delete source 在提交移动并验证目标区域中的资源之后,你可以删除源资源。After committing the move, and verifying resources in the target region, you can delete the source resource. 提交后,资源状态会变为“待删除源”。After committing, a resource state moves to Delete source pending. 随后,你可选择源资源并将其删除。You can then select the source resource and delete it.

- 仅可删除状态为“待删除源”的资源。- Only resources in the Delete source pending state can be deleted.
不支持在资源转移器门户中删除资源组或 SQL Server。Deleting a resource group or SQL Server in the Resource Mover portal isn't supported. 只能从资源属性页面删除这些资源。These resources can only be deleted from the resource properties page.

移动区域状态Move region states

移动过程有许多状态,在每种状态下都可能会出现问题。The move process has a number of states, and issues that can arise during each state. 流程图汇总了这些状态和问题。These are summarized in the flowchart.

可能的状态和问题的流程图

依赖项分析Dependency analysis

当你执行移动过程时,系统在以下情况下可能会要求你验证依赖项:As you progress through the move process, you might be asked to validate dependencies if:

  • 某个资源使用了不在移动集合中的依赖项资源。A resource uses dependent resources that aren't in the move collection.
  • 移动集合中的某个依赖项资源有其自己的依赖项,但这些依赖项不在移动集合中。A dependent resource in the move collection has its own dependencies that aren't in the move collection.
  • 你修改了资源的目标设置,需要重新验证依赖项。You modified target settings for the resource, and you need to revalidate dependencies.

删除资源Remove resources

如果你不想移动某个资源,可以将其从移动集合中删除。If you don’t want to move a resource, you can remove it from the move collection. 通常会从集合中删除资源以及任何关联的操作或对象(例如复制操作或存储的模板)。In general, the resource is then deleted from the collection, along with any associated actions or objects, such as replication, or stored templates. 删除资源时,具体会发生什么情况取决于资源的类型,以及删除资源时该资源的状态。Exactly what happens when you remove a resource depends on the type of resource, and the state of the resource when you delete it. 了解详细信息 Learn more.

移动影响Move impact

下表汇总了跨区域移动时受影响的内容。The table summarizes what's impacted when you're moving across regions.

行为Behavior 跨区域Across regions
数据Data 移动资源数据和元数据。Resource data and metadata are moved.

将暂时存储元数据,以跟踪资源依赖项和操作的状态。Metadata is stored temporarily to track status of resource dependencies and operations.
资源Resource 源资源保持不变以确保应用继续工作,可以选择在移动后将其删除。The source resource stays intact to ensure that apps continue to work, and can optionally be removed after the move.

在目标区域中创建资源。A resource is created in the target region.
移动过程Move process 需要手动干预和监视的多步骤过程。Multi-step process requiring manual intervention and monitoring.
测试:Testing 对移动进行测试非常重要,因为在移动后,应用应当继续在目标区域中按预期方式工作。Testing the move is important, since the apps should continue to work as expected in the target region, after the move.
故障时间Downtime 预计不会丢失数据,但需要停机一段时间来移动资源。No data loss expected, but some downtime to move resources.

后续步骤Next steps

将 Azure VM 移动到另一区域。Move Azure VMs to another region. 将 Azure SQL 资源移动到另一区域。Move Azure SQL resources to another region.