Skip to content

Commit ae4c75a

Browse files
committed
Refresh the move article
1 parent e5d467a commit ae4c75a

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed
31.4 KB
Loading

articles/azure-resource-manager/management/move-resource-group-and-subscription.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Move resources to a new subscription or resource group
33
description: Describes how to move resources to a new resource group or subscription, and the steps to take to ensure a successful move operation.
44
ms.topic: conceptual
5-
ms.date: 05/31/2024
5+
ms.date: 01/06/2025
66
ms.custom: devx-track-azurecli, devx-track-azurepowershell, devx-track-arm-template, devx-track-python
77
content_well_notification:
88
- AI-contribution
@@ -11,13 +11,14 @@ ai-usage: ai-assisted
1111

1212
# Move Azure resources to a new resource group or subscription
1313

14-
This article shows you how to move Azure resources to either another Azure subscription or another resource group under the same subscription. You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources.
14+
This article explains how to move Azure resources between resource groups. These resource groups can either be in the same subscription or in different subscriptions. If the move is across subscriptions, then these subscriptions must belong to the same Azure Active Directory (AAD) tenant. You can use Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources.
1515

16-
Both the source group and the target group are locked during the move operation. Write and delete operations are blocked on the resource groups until the move completes. This lock means you can't add, update, or delete resources in the resource groups. It doesn't mean the resources are frozen. For example, if you move an Azure SQL logical server, its databases and other dependent resources to a new resource group or subscription, applications that use the databases experience no downtime. They can still read and write to the databases. The lock can last for a maximum of four hours, but most moves complete in much less time.
16+
During a move operation, both the source and target resource groups are locked: within each resource group, you can't create a resource, delete a resource, or update a resource’s properties. However, the existing resources stay fully operational. For example, when a virtual machine (VM) is being moved from one resource group to another, the VM can't be deleted and the VM’s properties (for example, VM size) can't be updated. However, the VM itself stays fully operational and services that use it experiences no additional downtime because of the resource move. The lock can last for a maximum of four hours, but most moves are completed in much less time and the lock is removed sooner.
1717

18-
If your move requires setting up new dependent resources, you'll experience an interruption in those services until they've been reconfigured.
18+
Only top-level (parent) resources should be included in the move request. Child resources are moved alongside a parent, but they can't be moved independently. For example, Microsoft.Compute/virtualMachines is a parent resource and can be moved. Its child resource, Microsoft.Compute/virtualMachines/extensions, will be moved alongside the parent. However, the child resource can't be moved by itself.
1919

20-
Moving a resource only moves it to a new resource group or subscription. It doesn't change the location of the resource.
20+
Moving a resource preserves its dependencies with child resources, but its dependencies with other resources may break and need to be reconfigured.
21+
Moving a resource only changes its resource group, not its physical region.
2122

2223
> [!NOTE]
2324
> Azure resources can't be moved if a read-only lock exists on the source or destination resource group or subscription.
@@ -26,7 +27,7 @@ Moving a resource only moves it to a new resource group or subscription. It does
2627

2728
When you move a resource, you change its resource ID. The standard format for a resource ID is `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}`. When you move a resource to a new resource group or subscription, you change one or more values in that path.
2829

29-
If you use the resource ID anywhere, you'll need to change that value. For example, if you have a [custom dashboard](/azure/azure-portal/quickstart-portal-dashboard-azure-cli) in the portal that references a resource ID, you'll need to update that value. Look for any scripts or templates that need to be updated for the new resource ID.
30+
If you use the resource ID anywhere, you need to change that value. For example, if you have a [custom dashboard](/azure/azure-portal/quickstart-portal-dashboard-azure-cli) in the portal that references a resource ID, you need to update that value. Look for any scripts or templates that need to be updated for the new resource ID.
3031

3132
## Checklist before moving resources
3233

@@ -99,7 +100,7 @@ There are some important steps to do before moving a resource. By verifying thes
99100
az provider register --namespace Microsoft.Batch
100101
```
101102

102-
1. Before moving the resources, check the subscription quotas for the subscription you're moving the resources to. If moving the resources means the subscription will exceed its limits, you need to review whether you can request an increase in the quota. For a list of limits and how to request an increase, see [Azure subscription and service limits, quotas, and constraints](../../azure-resource-manager/management/azure-subscription-service-limits.md).
103+
1. Before moving the resources, check the subscription quotas for the subscription you're moving the resources to. If moving the resources means the subscription exceeds its limits, you need to review whether you can request an increase in the quota. For a list of limits and how to request an increase, see [Azure subscription and service limits, quotas, and constraints](../../azure-resource-manager/management/azure-subscription-service-limits.md).
103104

104105
1. The account moving the resources must have at least the following permissions:
105106

@@ -342,7 +343,7 @@ resource_client.resources.begin_move_resources(
342343

343344
### Validate
344345

345-
The [validate move operation](/rest/api/resources/resources/validate-move-resources) lets you test your move scenario without actually moving the resources. Use this operation to check if the move will succeed. Validation is automatically called when you send a move request. Use this operation only when you need to predetermine the results. To run this operation, you need the:
346+
The [validate move operation](/rest/api/resources/resources/validate-move-resources) lets you test your move scenario without actually moving the resources. Use this operation to check if the move succeeds. Validation is automatically called when you send a move request. Use this operation only when you need to predetermine the results. To run this operation, you need the:
346347

347348
* Name of the source resource group
348349
* Resource ID of the target resource group
@@ -426,12 +427,18 @@ If a resource can't be moved within four hours, Resource Manager unlocks both re
426427

427428
### What are the implications of the source and destination resource groups being locked during the resource move?
428429

429-
The lock prevents you from deleting either resource group, creating a new resource in either resource group, or deleting any of the resources involved in the move.
430+
The lock prevents you from deleting either resource group. Secondly, within each resource group, the lock prevents you from creating a new resource, deleting a resource, or updating a resource’s properties (for example, changing the size of a VM).
430431

431432
The following image shows an error message from the Azure portal when a user tries to delete a resource group that is part of an ongoing move.
432433

433434
:::image type="content" source="./media/move-resource-group-and-subscription/move-error-delete.png" alt-text="Screenshot of the Azure portal showing an error message when trying to delete a resource group involved in an ongoing move operation.":::
434435

436+
In the following image, the VM resource is part of a resource group (“TestB”) that is going through a move operation. An error message is returned from the Azure portal when a user tries to update a property (VM size) of the VM.
437+
438+
:::image type="content" source="./media/move-resource-group-and-subscription/move-error-delete-2.png" alt-text="Screenshot of the Azure portal showing an error message when a user tries to update a property (VM size) of the VM.":::
439+
440+
Furthermore, during a resource move, both the source and destination resource groups can't be part of move operations with other resource groups. (for example. If there's an ongoing resource move from resource group A to resource group B, then neither group could partake in move operations with resource group C at the same time.)
441+
435442
### What does the error code "MissingMoveDependentResources" mean?
436443

437444
When you move a resource, its dependent resources must either exist in the destination resource group or subscription, or be included in the move request. You get the MissingMoveDependentResources error code when a dependent resource doesn't meet this requirement. The error message has details about the dependent resource that needs to be included in the move request.
@@ -455,7 +462,7 @@ In general, a virtual network gateway must always be in the same resource group
455462

456463
### What does the error code "RequestDisallowedByPolicy" mean?
457464

458-
Resource Manager validates your move request before attempting the move. This validation includes checking policies defined on the resources involved in the move. For example, if you're attempting to move a key vault but your organization has a policy to deny the creation of a key vault in the target resource group, validation fails and the move is blocked. The returned error code is **RequestDisallowedByPolicy**.
465+
Resource Manager validates your move request before attempting the move. This validation includes checking policies defined on the resources involved in the move. For example, if you're attempting to move a key vault but your organization has a policy to deny the creation of a key vault in the target resource group, validation fails and the move is blocked. The returned error code is **RequestDisallowedByPolicy**.
459466

460467
For more information about policies, see [What is Azure Policy?](../../governance/policy/overview.md).
461468

@@ -479,10 +486,6 @@ When you receive this error, you have two options. Either move your resources to
479486

480487
No, you can't move a resource group to a new subscription. But, you can move all of the resources in the resource group to a resource group in another subscription. Settings such as tags, role assignments, and policies aren't automatically transferred from the original resource group to the destination resource group. You need to reapply these settings to the new resource group. For more information, see [Move resources to new resource group or subscription](./move-support-resources.md).
481488

482-
### Unsupported scenarios
483-
484-
The platform blocks a scenario where resources from Subscription A are migrated to Subscription B when *at the same time* resources from Subscription B are migrated to Subscription C. This is by design.
485-
486489
## Next steps
487490

488491
For a list of which resources support move, see [Move operation support for resources](move-support-resources.md).

0 commit comments

Comments
 (0)