Moving Azure resources doesn't do anything #379

Closed
tomasherceg opened this Issue May 12, 2015 · 13 comments

Comments

Projects
None yet
10 participants
@tomasherceg

I tried to used the Move-AzureResource commandlet and it doesn't do anything.
It returns me immediately to the Powershell prompt.

Neither

get-azureresource -resourcegroupname MyGroup | move-azureresource -destinationresourcegroupname MyNewGroup

nor

move-azureresource -destinationresourcegroupname MyNewGroup -ResourceId MyResourceId -Force

works for me.

The behavior is exactly the same as here:
http://stackoverflow.com/questions/30123326/cant-get-move-azureresource-working

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 26, 2015

I have got the exact same problem
Nothing happens when you run the commands.
Debug shows nothing interesting or errors

ghost commented May 26, 2015

I have got the exact same problem
Nothing happens when you run the commands.
Debug shows nothing interesting or errors

@ilkayilknur

This comment has been minimized.

Show comment
Hide comment
@ilkayilknur

ilkayilknur May 29, 2015

@eriksonjonas I used March release instead of the latest release and it worked. I've moved a storage account to other resource group. This may help you.

@eriksonjonas I used March release instead of the latest release and it worked. I've moved a storage account to other resource group. This may help you.

@steevegilbert

This comment has been minimized.

Show comment
Hide comment
@steevegilbert

steevegilbert May 29, 2015

Same here, I'll go and try the March release as suggested

Same here, I'll go and try the March release as suggested

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 29, 2015

@ilkayilknur thx, ill try that release

ghost commented May 29, 2015

@ilkayilknur thx, ill try that release

@petrsvihlik

This comment has been minimized.

Show comment
Hide comment
@petrsvihlik

petrsvihlik Jun 1, 2015

Contributor

I tried 0.8.16 but moving web apps doesn't work in that version either...

Contributor

petrsvihlik commented Jun 1, 2015

I tried 0.8.16 but moving web apps doesn't work in that version either...

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 1, 2015

Interesting, i could move a storage acc, but no cloud service and vm.

ghost commented Jun 1, 2015

Interesting, i could move a storage acc, but no cloud service and vm.

@sagoo33

This comment has been minimized.

Show comment
Hide comment
@sagoo33

sagoo33 Jun 2, 2015

Same for me, I'm trying to move a web app from a resource group in the Australian data centre to another resource group in the same data centre, and I receive a number of error messages (from the portal audit log)

"...statusMessage:{"Code":"Conflict","Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first.","Target":null,"Details":[{"Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first."}..."

"statusCode:BadRequest
statusMessage:{"Code":"BadRequest","Message":"Exception of type 'Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException' was thrown."}"

Could this be something to do with the application insights and event rules (belonging to the web app/app service plan/resourcegroup) being housed in the Central US data centre?

I am trying this in version 0.9.2.

This is the result from the powershell window:

Move-AzureResource : {
"Error": {
"Code": "99",
"Message": "Resources '/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microso
ft.insights/alertrules/CPUHigh adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/a
dam-RG/providers/microsoft.insights/alertrules/LongHttpQueue adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microsoft.insights/autoscalesettings/adam-webserver-test-adam-RG,/subscr
iptions/{subscriptionid}/resourceGroups/adam-RG/providers/Microsoft.Web/serverFarms/adam-webserver-
test,/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/Microsoft.Web/sites/adam-test
456' could not be moved. The tracking Id is '{trackingid}'",
"Target": null,
"Details": null
}
}
At line:1 char:48

  • Get-AzureResource -ResourceGroupName adam-RG | Move-AzureResource -DestinationRe ...
  •                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Move-AzureResource], ErrorResponseMessageException
    • FullyQualifiedErrorId : 99,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.MoveAzureResourceComm
      and

sagoo33 commented Jun 2, 2015

Same for me, I'm trying to move a web app from a resource group in the Australian data centre to another resource group in the same data centre, and I receive a number of error messages (from the portal audit log)

"...statusMessage:{"Code":"Conflict","Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first.","Target":null,"Details":[{"Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first."}..."

"statusCode:BadRequest
statusMessage:{"Code":"BadRequest","Message":"Exception of type 'Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException' was thrown."}"

Could this be something to do with the application insights and event rules (belonging to the web app/app service plan/resourcegroup) being housed in the Central US data centre?

I am trying this in version 0.9.2.

This is the result from the powershell window:

Move-AzureResource : {
"Error": {
"Code": "99",
"Message": "Resources '/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microso
ft.insights/alertrules/CPUHigh adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/a
dam-RG/providers/microsoft.insights/alertrules/LongHttpQueue adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microsoft.insights/autoscalesettings/adam-webserver-test-adam-RG,/subscr
iptions/{subscriptionid}/resourceGroups/adam-RG/providers/Microsoft.Web/serverFarms/adam-webserver-
test,/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/Microsoft.Web/sites/adam-test
456' could not be moved. The tracking Id is '{trackingid}'",
"Target": null,
"Details": null
}
}
At line:1 char:48

  • Get-AzureResource -ResourceGroupName adam-RG | Move-AzureResource -DestinationRe ...
  •                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Move-AzureResource], ErrorResponseMessageException
    • FullyQualifiedErrorId : 99,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.MoveAzureResourceComm
      and
@vivsriaus

This comment has been minimized.

Show comment
Hide comment
@vivsriaus

vivsriaus Jun 15, 2015

Contributor

This is now fixed. Please update to latest 0.9.3

Contributor

vivsriaus commented Jun 15, 2015

This is now fixed. Please update to latest 0.9.3

@vivsriaus vivsriaus closed this Jun 15, 2015

@ckonig

This comment has been minimized.

Show comment
Hide comment
@ckonig

ckonig Jun 18, 2015

Sadly I cannot confirm that this is fixed with 0.9.3, tried it today with that version but still the behavior is the same as stated in the linked Stackoverflow question.

ckonig commented Jun 18, 2015

Sadly I cannot confirm that this is fixed with 0.9.3, tried it today with that version but still the behavior is the same as stated in the linked Stackoverflow question.

@nmackenzie

This comment has been minimized.

Show comment
Hide comment
@nmackenzie

nmackenzie Jul 17, 2015

To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example:

Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName NewResourceGroup

By default, the resources in a cloud service are put in a resource group with the same name as the DNS name of the cloud service.

To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example:

Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName NewResourceGroup

By default, the resources in a cloud service are put in a resource group with the same name as the DNS name of the cloud service.

@petrsvihlik

This comment has been minimized.

Show comment
Hide comment
@petrsvihlik

petrsvihlik Jul 17, 2015

Contributor

I just tried moving web apps across resource groups - which was the original issue - and it works fine in 0.9.4.

Contributor

petrsvihlik commented Jul 17, 2015

I just tried moving web apps across resource groups - which was the original issue - and it works fine in 0.9.4.

@OliverFlux

This comment has been minimized.

Show comment
Hide comment
@OliverFlux

OliverFlux Aug 4, 2015

Hey Guys .
You know if I can move this resources ?
Resources Like , Virtual networkings , Backup Vaults .

I tried using these lines:
Get-AzureResource -ResourceId $ ResourceID | Move-AzureResource -DestinationResourceGroupName $ Name

Thanks .

Hey Guys .
You know if I can move this resources ?
Resources Like , Virtual networkings , Backup Vaults .

I tried using these lines:
Get-AzureResource -ResourceId $ ResourceID | Move-AzureResource -DestinationResourceGroupName $ Name

Thanks .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment