简体   繁体   中英

Moving resources failed because resource group has active deployments

When I try to change a website's resource group in Azure Powershell, I get the following error:

"Error": {
  "Code": "MultipleErrorsOccurred",
  "Message": "Multiple error occurred: Conflict,Conflict. Please see details.",
  "Target": null,
  "Details": [
    {
      "Code": "DeploymentActive",
      "Message": "Moving resources failed because resource group 'rg1' has active deployments.",
      "Target": null,
      "Details": null
    },
    {
      "Code": "DeploymentActive",
      "Message": "Moving resources failed because resource group 'rg1' has active deployments.",
      "Target": null,
      "Details": null
    }
}

I use the following commands:

$webapp = Get-AzureResource -ResourceGroupName "rg1" -ResourceName resourceName -ResourceType Microsoft.Web/sites

Move-AzureResource -DestinationResourceGroupName "rg2" -ResourceId $webapp.ResourceId

One solution is to delete and recreate the website but is there any other way that we can sort this problem out without deleting anything?

Move-AzureResource is obsolete now. Try using Move-AzureRmResource. For the error, you will have to wait till an ongoing deployment in rg1 is complete.

You could retry once the deployment is complete.

Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM