Moving Azure resources doesn't do anything
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
I have got the exact same problem Nothing happens when you run the commands. Debug shows nothing interesting or errors
@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.
Same here, I'll go and try the March release as suggested
@ilkayilknur thx, ill try that release
I tried 0.8.16 but moving web apps doesn't work in that version either...
Interesting, i could move a storage acc, but no cloud service and vm.
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
This is now fixed. Please update to latest 0.9.3
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.
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.
I just tried moving web apps across resource groups - which was the original issue - and it works fine in 0.9.4.
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 .
I haven't tried that. Check this out: http://feedback.azure.com/forums/223579-azure-preview-portal/suggestions/6178622-ability-to-move-resources-from-one-resource-group
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17