You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/management/move-resource-group-and-subscription.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,23 +37,23 @@ Some important steps precede moving a resource. You can avoid errors if you veri
37
37
1. The source and destination subscriptions must exist within the same [Microsoft Entra tenant](../../active-directory/develop/quickstart-create-new-tenant.md). Use the Azure CLI or PowerShell to check that both subscriptions have the same tenant ID.
38
38
39
39
# [Azure CLI](#tab/azure-cli)
40
-
40
+
41
41
```azurecli-interactive
42
42
az account show --subscription <your-source-subscription> --query tenantId
43
43
az account show --subscription <your-destination-subscription> --query tenantId
If the tenant IDs for the source and destination subscriptions don't match, use the following methods to reconcile them:
56
-
56
+
57
57
- [Transfer billing ownership of an Azure subscription](../../cost-management-billing/manage/billing-subscription-transfer.md#transfer-billing-ownership-of-an-azure-subscription).
58
58
- [Associate or add an Azure subscription to your Microsoft Entra tenant](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md).
59
59
@@ -64,7 +64,7 @@ Some important steps precede moving a resource. You can avoid errors if you veri
64
64
1. Some services have specific limitations or requirements when moving resources. Check the following move guidance before moving resources within these services:
65
65
66
66
- If you're using Azure Stack Hub, you can't move resources between groups.
- [Classic deployment model](./move-limitations/classic-model-move-limitations.md) for classic compute, storage, virtual networks, and cloud services
@@ -163,17 +163,17 @@ Moving resources from one subscription to another is a three-step process. To il
163
163
164
164
1. The portal validates that the resources can be moved. Wait for validation to complete.
165
165
166
-
:::image type="content" source="./media/move-resource-group-and-subscription/validation.png" alt-text="Screenshot of the Azure portal showing the validation process for the move operation.":::
166
+
:::image type="content" source="./media/move-resource-group-and-subscription/validation.png" alt-text="Screenshot of the Azure portal showing the validation process for the move operation.":::
167
167
168
168
1. When validation completes successfully, select **Next**.
169
169
170
170
1. Acknowledge that you need to update tools and scripts for these resources. To start moving the resources, select **Move**.
171
171
172
-
:::image type="content" source="./media/move-resource-group-and-subscription/acknowledge-change.png" alt-text="Screenshot of the Azure portal where the user acknowledges the need to update tools and scripts before starting the move operation.":::
172
+
:::image type="content" source="./media/move-resource-group-and-subscription/acknowledge-change.png" alt-text="Screenshot of the Azure portal where the user acknowledges the need to update tools and scripts before starting the move operation.":::
173
173
174
174
1. The Azure portal notifies you when the move completes.
175
175
176
-
:::image type="content" source="./media/move-resource-group-and-subscription/view-notification.png" alt-text="Screenshot of the Azure portal displaying a notification with the results of the move operation.":::
176
+
:::image type="content" source="./media/move-resource-group-and-subscription/view-notification.png" alt-text="Screenshot of the Azure portal displaying a notification with the results of the move operation.":::
177
177
178
178
### Use the Azure CLI
179
179
@@ -415,19 +415,19 @@ Specify the target resource group and resources to move in the body of the reque
415
415
416
416
## Frequently asked questions
417
417
418
-
**My resource move operation that usually takes a few minutes is running for almost an hour. Is something wrong?**
418
+
### My resource move operation that usually takes a few minutes is running for almost an hour. Is something wrong?
419
419
420
420
Moving a resource is a complex operation with different phases. It can involve more than just the resource provider of the resource you're trying to move. Azure Resource Manager allows a move operation four hours to finish because of the dependencies between resource providers. This duration gives them time to recover from transient issues. If your move request is within the four-hour period, the operation keeps trying to complete and might succeed. The operation locks the source and destination resource groups during this time to avoid consistency issues.
421
421
422
-
**Why is my resource group locked for four hours during resource move?**
422
+
### Why is my resource group locked for four hours during resource move?
423
423
424
424
- Move operations are allowed four hours to complete. The operation locks the source and destination resource groups during this time to prevent them from being modified.
425
425
426
426
- There are two phases in a move request. Resources move during the first phase, and resource providers that depend on the resources being moved are notified during the second phase. A resource group can be locked for all four hours when a resource provider fails either phase. Resource Manager initiates any failed steps during the span of the move operation.
427
427
428
428
- Resource Manager unlocks both resource groups if a resource doesn't move within four hours. Resources that move successfully are in the destination resource group. Resources that fail to move remain in the source resource group.
429
429
430
-
**What are the implications of the source and destination resource groups being locked during the resource move?**
430
+
### What are the implications of the source and destination resource groups being locked during the resource move?
431
431
432
432
The lock prevents you from deleting either resource group. The lock also prevents you from creating a new resource, deleting a resource, or updating a resource's properties within each resource group (for example, changing a virtual machine's size).
433
433
@@ -441,9 +441,9 @@ In the preceding image, the virtual machine resource belongs to a resource group
441
441
442
442
Additionally, the source and the destination resource groups can't participate in other move operations simultaneously during a resource move. For example, if you're moving resources from resource group A to resource group B, both resource group A and resource group B can't be involved in another move operation at the same time. You can't simultaneously move resources to or from resource group C. This restriction prevents multiple conflicting operations from locking resource groups during the move process.
443
443
444
-
**What does the error code "MissingMoveDependentResources" mean?**
444
+
### What does the error code "MissingMoveDependentResources" mean?
445
445
446
-
When you move a resource, its dependent resources must 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 provides details about the dependent resource that you need to include in the move request.
446
+
When you move a resource, its dependent resources must 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 provides details about the dependent resource that you need to include in the move request.
447
447
448
448
For example, moving a virtual machine could require moving seven resource types with three different resource providers. Those resource providers and types are:
449
449
@@ -462,29 +462,29 @@ For example, moving a virtual machine could require moving seven resource types
462
462
463
463
Another common example involves moving a virtual network where you might have to move several other resources associated with that virtual network. The move request could require moving public IP addresses, route tables, virtual network gateways, network security groups, and other resources. A virtual network gateway should be in the same resource group as its virtual network since they can't move separately.
464
464
465
-
**What does the error code "RequestDisallowedByPolicy" mean?**
465
+
### What does the error code "RequestDisallowedByPolicy" mean?
466
466
467
-
Resource Manager validates your move request before attempting a move. This validation includes checking policies defined for the resources involved in the move. For example, the validation fails when you're attempting to move a key vault but your organization has a policy to deny creating a key vault in the target resource group. The returned error code is **RequestDisallowedByPolicy**.
467
+
Resource Manager validates your move request before attempting a move. This validation includes checking policies defined for the resources involved in the move. For example, the validation fails when you're attempting to move a key vault but your organization has a policy to deny creating a key vault in the target resource group. The returned error code is ### RequestDisallowedByPolicy**.
468
468
469
469
For more information about policies, see [What is Azure Policy?](../../governance/policy/overview.md).
470
470
471
-
**Why can't I move some resources in Azure?**
471
+
### Why can't I move some resources in Azure?
472
472
473
473
Not all Azure resources allow move operations.
474
474
475
-
**How many resources can I move in one operation?**
475
+
### How many resources can I move in one operation?
476
476
477
477
Separate large moves into different move operations when possible. Resource Manager immediately returns an error when there are more than 800 resources in a single operation. However, moving fewer than 800 resources can also fail by timing out.
478
478
479
-
**What is the meaning of the error that a resource isn't in a "succeeded" state?**
479
+
### What is the meaning of the error that a resource isn't in a "succeeded" state?
480
480
481
481
When you get an error message indicating that you can't move a resource because it isn't in a **Succeeded** state, it might be because a dependent resource is blocking the move. Typically, the error code is **MoveCannotProceedWithResourcesNotInSucceededState**.
482
482
483
483
If the source or target resource group contains a virtual network, the states of all resources that depend on that virtual network are checked during the move. This check includes resources that directly and indirectly depend on the network. The move is blocked if any resources aren't in a succeeded state. For example, if a virtual machine using a virtual network that doesn't report a succeeded state, the move is blocked. The move is blocked even when the virtual machine isn't one of the resources being moved. The move is also blocked even when the virtual machine isn't in the source or destination resource group.
484
484
485
485
To resolve this issue, move your resources to a resource group that doesn't have a virtual network or [contact support](/azure/azure-portal/supportability/how-to-create-azure-support-request).
486
486
487
-
**Can I move a resource group to a different subscription?**
487
+
### Can I move a resource group to a different subscription?
488
488
489
489
No, you can't move a resource group to a new subscription. But, you can move all resources in a resource group to a resource group in another subscription. Settings such as tags, role assignments, and policies don't transfer automatically from the original resource group to the destination resource group. You need to apply these settings manually to the new resource group.
0 commit comments