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
@@ -63,48 +63,49 @@ Some important steps precede moving a resource. You can avoid errors if you veri
63
63
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
-
- If you're using Azure Stack Hub, you can't move resources between groups.
- To move an Azure subscription to a new management group, see [Move subscriptions](../../governance/management-groups/manage.md#move-management-groups-and-subscriptions).
66
+
- If you're using Azure Stack Hub, you can't move resources between groups.
- To move an Azure subscription to a new management group, see [Move subscriptions](../../governance/management-groups/manage.md#move-management-groups-and-subscriptions).
75
76
76
77
1. The destination subscription must be registered for the resource provider of the resource you're moving. If it's not, you receive an error stating that the **subscription isn't registered for a resource type**. You might see this error when moving a resource to a new subscription, but you didn't previously use the resource type in the subscription.
77
78
78
79
# [Azure CLI](#tab/azure-cli)
79
-
80
+
80
81
To get the registration status:
81
-
82
+
82
83
```azurecli-interactive
83
84
az account set -s <destination-subscription-name-or-id>
84
85
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table
1. Before starting a move operation, check the subscription quota for the subscription to which you're moving resources. Verify if you can request an increase in a quota that would cause a destination subscription to exceed its limit. For detailed guidance about 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).
@@ -121,7 +122,7 @@ Some important steps precede moving a resource. You can avoid errors if you veri
121
122
1. **For a move across subscriptions, the resource and its dependent resources must be located in the same resource group and they must be moved together.** For example, a virtual machine with managed disks requires you to move the virtual machine, managed disks, and other dependent resources together.
122
123
123
124
If you're moving a resource to a new subscription, check if the resource has any dependent resources and if they're located in the same resource group. If the resources aren't in the same resource group, check if you can combine them into the same resource group. If you can, use one move operation across resource groups to consolidate all the resources into the same resource group.
124
-
125
+
125
126
For more information, see [Scenario for move across subscriptions](#scenario-for-moving-across-subscriptions).
126
127
127
128
## Scenario for moving across subscriptions
@@ -142,37 +143,37 @@ Moving resources from one subscription to another is a three-step process. To il
142
143
143
144
1. Select the resources that you want to move. To move all of the resources, select the checkbox at the top of list. Or, select resources individually.
144
145
145
-
:::image type="content" source="./media/move-resource-group-and-subscription/select-resources-to-move.png" alt-text="Screenshot of the Azure portal showing the selection of resources to move.":::
146
+
:::image type="content" source="./media/move-resource-group-and-subscription/select-resources-to-move.png" alt-text="Screenshot of the Azure portal showing the selection of resources to move.":::
146
147
147
148
1. Select the **Move** button.
148
149
149
-
:::image type="content" source="./media/move-resource-group-and-subscription/select-move.png" alt-text="Screenshot of the Azure portal displaying the Move button with three options.":::
150
-
150
+
:::image type="content" source="./media/move-resource-group-and-subscription/select-move.png" alt-text="Screenshot of the Azure portal displaying the Move button with three options.":::
151
+
151
152
This button gives you three options:
152
-
153
+
153
154
- Move to a new resource group.
154
155
- Move to a new subscription.
155
-
- Move to a new region. To change regions, see [Move resources across regions (from resource group) with Azure Resource Mover](../../resource-mover/move-region-within-resource-group.md?toc=/azure/azure-resource-manager/management/toc.json).
156
+
- Move to a new region. To change regions, see [Move resources across regions (from resource group) with Azure Resource Mover](../../resource-mover/move-region-within-resource-group.md?toc=/azure/azure-resource-manager/management/toc.json).
156
157
157
158
1. Select if you're moving the resources to a new resource group or subscription.
158
159
159
160
1. The source resource group sets automatically. Specify the destination resource group. If you're moving to a new subscription, specify this option. Select **Next**.
160
161
161
-
:::image type="content" source="./media/move-resource-group-and-subscription/select-destination-group.png" alt-text="Screenshot of the Azure portal where the user specifies the destination resource group for the move operation.":::
162
+
:::image type="content" source="./media/move-resource-group-and-subscription/select-destination-group.png" alt-text="Screenshot of the Azure portal where the user specifies the destination resource group for the move operation.":::
162
163
163
164
1. The portal validates that the resources can be moved. Wait for validation to complete.
164
165
165
-
:::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.":::
166
167
167
168
1. When validation completes successfully, select **Next**.
168
169
169
170
1. Acknowledge that you need to update tools and scripts for these resources. To start moving the resources, select **Move**.
170
171
171
-
:::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.":::
172
173
173
174
1. The Azure portal notifies you when the move completes.
174
175
175
-
:::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.":::
176
177
177
178
### Use the Azure CLI
178
179
@@ -414,19 +415,19 @@ Specify the target resource group and resources to move in the body of the reque
414
415
415
416
## Frequently asked questions
416
417
417
-
**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?
418
419
419
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.
420
421
421
-
**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?
422
423
423
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.
424
425
425
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.
426
427
427
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.
428
429
429
-
**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?
430
431
431
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).
432
433
@@ -440,9 +441,9 @@ In the preceding image, the virtual machine resource belongs to a resource group
440
441
441
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.
442
443
443
-
**What does the error code "MissingMoveDependentResources" mean?**
444
+
### What does the error code "MissingMoveDependentResources" mean?
444
445
445
-
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.
446
447
447
448
For example, moving a virtual machine could require moving seven resource types with three different resource providers. Those resource providers and types are:
448
449
@@ -461,29 +462,29 @@ For example, moving a virtual machine could require moving seven resource types
461
462
462
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.
463
464
464
-
**What does the error code "RequestDisallowedByPolicy" mean?**
465
+
### What does the error code "RequestDisallowedByPolicy" mean?
465
466
466
-
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**.
467
468
468
469
For more information about policies, see [What is Azure Policy?](../../governance/policy/overview.md).
469
470
470
-
**Why can't I move some resources in Azure?**
471
+
### Why can't I move some resources in Azure?
471
472
472
473
Not all Azure resources allow move operations.
473
474
474
-
**How many resources can I move in one operation?**
475
+
### How many resources can I move in one operation?
475
476
476
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.
477
478
478
-
**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?
479
480
480
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**.
481
482
482
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.
483
484
484
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).
485
486
486
-
**Can I move a resource group to a different subscription?**
487
+
### Can I move a resource group to a different subscription?
487
488
488
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