Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Azure resources doesn't do anything #379

Closed
tomasherceg opened this issue May 12, 2015 · 14 comments
Closed

Moving Azure resources doesn't do anything #379

tomasherceg opened this issue May 12, 2015 · 14 comments

Comments

@tomasherceg
Copy link

@tomasherceg tomasherceg commented May 12, 2015

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
Copy link

@ghost 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
Copy link

@ilkayilknur ilkayilknur commented 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.

@steevegilbert
Copy link

@steevegilbert steevegilbert commented May 29, 2015

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

@ghost
Copy link

@ghost ghost commented May 29, 2015

@ilkayilknur thx, ill try that release

@petrsvihlik
Copy link
Contributor

@petrsvihlik petrsvihlik commented Jun 1, 2015

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

@ghost
Copy link

@ghost ghost commented Jun 1, 2015

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

@sagoo33
Copy link

@sagoo33 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
Copy link
Contributor

@vivsriaus vivsriaus commented Jun 15, 2015

This is now fixed. Please update to latest 0.9.3

@vivsriaus vivsriaus closed this Jun 15, 2015
@ckonig
Copy link

@ckonig 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
Copy link

@nmackenzie nmackenzie commented 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.

@petrsvihlik
Copy link
Contributor

@petrsvihlik 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
Copy link

@OliverFlux OliverFlux commented 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 .

@msftbot
Copy link

@msftbot msftbot bot commented Aug 14, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.