You may be aware that all of your data is stored in something called a ‘Blob Storage Account’. Each Azure subscription can have many blob storage accounts but not the other way around. You cannot share blob storage accounts between Azure subscriptions. That means there’s no easy way to move VMs around between Azure subscriptions through the website or PowerShell. However, it is fairly easy to do through an app. This tutorial will guide you through the process of moving VMs between Azure subscriptions.
NOTE: THE VM MUST BE SHUT DOWN BEFORE YOU DO THIS. If you still receive an error about a lease existing on the VHD, delete the VM but click Keep the attached disks and try again after a few minutes.
Step 1: Download and install CloudBerry Explorer.
CloudBerry Explorer is a free tool that one can use to move things around between Blob accounts. It’s not the only way to do it but it is one of the easiest.
Click Download Freeware on this page and register for a free account when you first open up the software.
Step 2: Add your Azure Blob accounts.
Add your accounts by going to File >> Add New Azure Blob Storage Account. It may prompt you to add another after adding your first account but if it doesn’t, just add another as before.
To add your accounts all you need to do is head to the Azure Portal, click on the Azure Storage Account you want and then click Manage Keys.
If the Azure subscription you want to move your VM over to doesn’t have an existing storage account, you can quickly create one by clicking New (in the bottom left of the Azure Portal) >> Data Services >> Storage.
Then just pick the accounts you want to use under each of the Source sections and click your way through the directory the VHD is currently located on the left panel and the destination panel on the right. If there aren’t any containers on the destination blob storage account (the root directory should have a container called vids (or something similar) listed), create one by clicking on this icon.
Step 3: Move your VHD.
Once you’ve got the VHD you want to move listed in the panel on the left and the destination panel on the right, click on the VHD you want to move and then click Move. If you wish to keep the VHD on your old Azure account too, click Copy instead.
Step 4: Create a new disk.
Then you’ll need to click CREATE down the bottom and fill in the appropriate details. Make sure you tick The VHD contains an operating system.
Step 5: Create the VM.
Lastly all you need to do is click New in the bottom left, then From Gallery and lastly you need to pick My Disks on the left and then pick your VHD. Once you do that, just create the VM as usual.
You can also use open-sourced tools to do this. Azure Storage Explorer (available here from CodePlex) is my favourite. Just add your accounts and download the VHD in question and re-upload to the account you want.