Reputation: 1
I'm looking into how to copy VMs from one subscriptions to another. After doing some research I found a lot of great articles describing the process on how to perform a move.
Examples
https://dzimchuk.net/moving-azure-vm-with-managed-disks-to-another-subscription/
Move Azure VM to other subscription in other region
However, one thing I'm wondering is: In the scenario of managed disk, why bother with the performing a snapshot saved to a blob > copying the blob > re-creating the VM. When you just save a snapshot to another subscription and then create a vm from that snapshot?
My reference:
Upvotes: 0
Views: 7124
Reputation: 647
The link you are referring to is not creating snapshot in other subscription. It is getting the snapshot which is already created in a resourcegroup and then a copy is initiated.
the below code from the url does the same.
$snapshot= Get-AzureRmSnapshot -ResourceGroupName $sourceResourceGroupName -Name $snapshotName
So in actual you have to create a snapshot in the source subscription and then copy it in another subscription
Upvotes: 0
Reputation: 31414
There are some limitations for moving resources, for managed disks, Azure do not support to move and the same limitation for snapshot created from managed disks. So you cannot just save a snapshot to another subscription and then create a VM from that snapshot.
For more information about managed VM, please read the document here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-move-resources#virtual-machines-limitations
So, if you want to move managed VM, you could follow the link you post in stack overflow: https://dzimchuk.net/moving-azure-vm-with-managed-disks-to-another-subscription/
Upvotes: 0