1
votes

I am trying to move Service Bus Namespace to a different resource group using powershell commands. The code below sometimes works and sometimes fails.

$Resource = Find-AzureRmResource -ResourceType "Microsoft.ServiceBus/Namespaces" -ResourceNameContains $ServiceBusNamespace   
Move-AzureRmResource -DestinationResourceGroupName $ResourceGroupName -ResourceId $Resource.ResourceId -Force  

And here is a random error information:

Move-AzureRmResource : ResourceMoveFailed : Resources '/subscriptions/f24b849a-ba33-4bd9-a87e-eca0df1cbcd2/resourceGroups/Default-ServiceBus-WestEurope/providers/Microsoft.ServiceBus/namespaces/cokolwiekNamespace' could not be moved. The tracking Id is '64c 52d24-a471-490d-b18a-b7838966a8e0'

What does the tracking Id means? Can I find it in some logs and have more meanigfull information?

1

1 Answers

0
votes

Thank you for your question.

I reproduce the same error in my lab, when I try to move my service bus to destination resource group, the destination resource group’s location is different from the source resource group. In fact, there are many reasons for this error. There are some important steps to perform before moving a resource. By verifying these conditions, you can avoid errors.

More information about move resource to new resource group, please refer to the link below: https://azure.microsoft.com/en-us/documentation/articles/resource-group-move-resources/

The tracking id is a randomly generated, different operations have different tracking id.
If you want to see the logs about the PowerShell, we can find the logs in localhost, run “eventvwr”, and select the “Applications and Services logs” -> “Microsoft”-> “windows” “PowerShell”-> “Operational”. like:
The picture of powershell logs in localhost

If you still have questions, welcome to post back here. Thanks.