Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Resource Group Stuck in "Moving Resources"

I was doing some cleanup moving some Azure Cloud Services to a newly created Resource group with the following command

Find-AzureRmResource -ResourceNameContains "oldresourcename" |
Move-AzureRmResource -DestinationResourceGroupName "newresourcegroup" -Verbose

Everything was going fine, but the last one I ran seems to be taking a very long time. It is a simple CS with one worker role and one web role and small size.

The command has been in a not completed state for over an hour, and out on the Portal, both resource groups have "Moving Resources" in purple at the top of the page. I am going to wait until tomorrow to see if it still persists, but it should not be taking this long.

Is there a way to cancel or halt this operation? The concern is that both Resource Groups are locked till this process is complete, which will be an issue moving forward.

like image 623
Isaac Levin Avatar asked Feb 02 '16 21:02

Isaac Levin


People also ask

How do I move resources between resource groups in azure?

You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources. 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.

Why can't I add or DELETE resources during a move?

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.

How do I move Azure resources to a new subscription?

To move to a new subscription, include a value for the DestinationSubscriptionId parameter. Use Azure CLI. To move existing resources to another resource group or subscription, use the az resource move command. Provide the resource IDs of the resources to move. The following example shows how to move several resources to a new resource group.

How long does it take to move a resource in azure?

Moving a resource is a complex operation that has different phases. It can involve more than just the resource provider of the resource you're trying to move. Because of the dependencies between resource providers, Azure Resource Manager allows 4 hours for the operation to complete.


1 Answers

From my experience the move will eventually time out if there's an issue. I had a similar issue moving a web app and the SSL cert caused the move to fail, but it took a couple of hours for it to fail.

More information from Microsoft on what is able to move:

https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-move-resources

like image 168
Mike Veazie - MSFT Avatar answered Sep 28 '22 12:09

Mike Veazie - MSFT