移动资源失败,因为资源组具有活动部署

时间:2015-07-09 12:03:53

标签: azure azure-powershell

当我尝试在Azure Powershell中更改网站的资源组时,出现以下错误:

"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
    }
}

我使用以下命令:

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

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

一种解决方案是删除并重新创建网站,但有没有其他方法可以解决这个问题而不删除任何内容?

1 个答案:

答案 0 :(得分:0)

Move-AzureResource现在已经过时了。尝试使用Move-AzureRmResource。 对于错误,您必须等到rg1中的持续部署完成。

部署完成后,您可以重试。

干杯!