Motor de recomendaciones personalizadas de Azure que ayuda a los usuarios a seguir los procedimientos recomendados para optimizar las implementaciones de Azure.
Hello Jeisson Velasquez
Thank you for reaching out to the Microsoft Q&A forum.
When investigated we see that your resource group is still locked in the “MovingResources” state because the NIC IP‐config update deployment failed mid‐move. During a cross-subscription move, Azure puts both the source and target resource groups under a “CanNotDelete” lock for the duration of the operation (up to four hours) to ensure consistency. If a child deployment fails (like your NICIPConfigUpdateDeployment), Resource Manager will retry for four hours, but sometimes those locks stick and you end up unable to stop VMs, update NICs, etc.
Here’s how you can force-complete/reset the move and unlock the RG:
Cancel and delete the stuck deployment
This can be done using Powershell or Azure CLI.
1.PowerShell
Stop-AzResourceGroupDeployment -ResourceGroupName <YourRG> -Name NICIPConfigUpdateDeployment
Remove-AzResourceGroupDeployment -ResourceGroupName <YourRG> -Name NICIPConfigUpdateDeployment
2.Azure CLI
az deployment group cancel --resource-group <YourRG> --name NICIPConfigUpdateDeployment
az deployment group delete --resource-group <YourRG> --name NICIPConfigUpdateDeployment
Verify and remove any secondary locks on the RG • List locks:
az lock list --resource-group <YourRG> --output table
• Delete any “CanNotDelete” or ReadOnly locks you find:
az lock delete --ids <lockId>
Check that your dependent networking resources (NICs, IP configs, NSGs, etc.) are all in a “Succeeded” state. If any of them are in a failed or updating state, fix/redeploy them so they’re healthy.
Re-trigger the move operation (including all dependent resources in the same request) once everything is clean. Make sure your destination subscription is registered for the Microsoft.Network provider and that you have the required move permissions on both RGs.
If the RG still remains locked let us know
Reference docs:
• Move resources across resource groups or subscriptions
https://docs.microsoft.com/azure/azure-resource-manager/resource-group-move-resources
• Why is my resource group locked for four hours during resource move?
• Networking move limitations
• List and delete resource group locks https://docs.microsoft.com/azure/azure-resource-manager/management/lock-resources#list-and-delete-locks-on-resource-groups