Azure is a great platform to use, and the new Managed Disks are fantastic as you just need to set it and forget it. However, if you run into the problem that I can recently with moving the VM from one resource group to another, you’ll run into a stumbling block pretty fast. I hit this because I put a VM in the wrong resource group, then the customer installed a bunch of software of the VM, then I went to move it to another resource group. That’s when I got the lovely error that said “Operation ‘move’ is not supported on Resource ‘MyVM’ with managed disks. (Code: BadRequest)”.
This error was a bit of a problem as I didn’t want to blow away the VM. I had to turn on a couple of Azure features in PowerShell (eventually you won’t have to do this, maybe you don’t have to do this already) and I was able to move the VM without issue. After running the following commands (and using Get-AzureRmProviderFeature to wait for the feature to be registered), the move worked.
Register-AzureRmProviderFeature -FeatureName ManagedResourcesMove -ProviderNamespace Microsoft.Compute
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Compute
At this point, I was able to move the VM and all it’s resources to the correct resource group using either PowerShell or the Azure Portal (I assume CLI worked as well, but I didn’t need to do more testing).
The post Moving VMs in Azure with Managed Disks Between Resource Groups appeared first on SQL Server with Mr. Denny.