How to move Azure VM between subscriptions

I recently needed to move an Azure Virtual Machine from one subscription to another one. I read a LOT on how to do that and it looks super complicated. At the end of the day, I found an easy 3 steps way to make it, so sharing on this blog

Step 1: Move the Azure VM from one Blob storage to another one

In Microsoft Azure, when you have a blob storage, it can be attached only to 1 subscription. You can of course have multiple storage attached into a subscription. So first step is to move the VHD which is used by the VM.

For this, I used the excellent CloudBerry Explorer for Azure which you can download for free here. After installation, just register for free and you’re good to go.

You’ll need to add your 2 blob storage, the one you want to move the VHD from and the one you want to move the VHD to.

To find the name of the storage and the key, just go into the Azure management console and select Manage Access Keys, you’ll get the info you need to setup both accounts.

Once setup, you can now have a view like this:

Stop your VM and you’re good to copy/paste your VM from one storage to another.

Step 2: Create a Disk from VHD

In the management console, go to Virtual Machine then Disks

then Create

fill a name, select the VHD from the storage you just moved your VHD file to.

I’ve assembled a virtual machine (VM) using the Azure Service Management (ASM) a.k.a. Classic deployment model. This VM encompasses AD (it is a Domain Controller), MS SQL Server and Sharepoint 2013. Yes, I know, that is an unsupported (by Microsoft) set-up for Sharepoint, but I have had it working as a development environment. Previously I have cloned it with Powershell but MS made some changes and instead of updating the scripts I tested with the way above.

The cloning works, Sharepoint works except Office add-ins (previously known as apps). I have hunted down the issue to nslookup. A working VM responds

c:\nslookup
Default Server: localhost
Address: 127.0.0.1

while non-working VM responds

c:\nslookup
Default Server: UnKnown
Address: 100.108.26.5

where the first three fields of the address are the same as a DHCP generated address for the server’s internal IP.

I repeat, the VM has worked previously. The only difference is that when cloned with Powershell it keeps working, when with Cloudberry + Azure gallery, nslookup quits to work.

Hi,
Thanks for your post. When i am trying to move vhd from one blob to another blob, getting the following error.

“There is currently a lease on the blob and no lease ID was specified in the request…”
I deleted the entire VM from the subscription. So could please help me on this. What is this “ID” and how to get that. Thanks

I read the article, it is very nice. I’m looking for the powershell script to move VM’s (OSDisk) from one account to another (one Subscripton to another) and also I’m looking for hardware upgrade and downgrade size of the VM’s without powering off.

I’m very much new to Azure and I would like to move my Linux VM’s from one Subscription to another.

Sorry if it is a off topic question, I’m trying to move complete resource group to another subscription and get the following error, where as I have granted ownership for both accounts to the resource group (Source and Destination). Move includes VM, Storage Accounts, Networks & Public IP’s.