Share via


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 Sourire

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.

image

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.

image

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

image

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

image

then Create

image

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

image

Step 3: Create the VM from the Disk

Go to the Virtual Machine instances

image

then create a New

image

select From Gallery

image

and go to Disks to select the disk you just created.

image

And you’re good to go to run your VM!

Comments

  • Anonymous
    October 05, 2015
    Very nice, thanks for sharing. I assume the data transfer part occurs between Azure and your client computer and from there again into Azure?

  • Anonymous
    October 10, 2015
    It's moved directly. If you want, you can move them to your PC as well.

  • Anonymous
    November 18, 2015
    Much Easier is impossible!  thanks!

  • Anonymous
    December 17, 2015
    Will this work for moving a VM from the Service Management platform to the Resource Manager platform?

  • Anonymous
    January 26, 2016
    when I attempt to copy a VM the copy option is not selectable?

  • Anonymous
    February 02, 2016
    Too bad this is only for the classic VM's and the old portal... How is this done in the new portal and with the new Resource Management?

    • Anonymous
      June 10, 2016
      Try Azure storage explorer for ARM vm's.
  • Anonymous
    February 06, 2016
    After register storage accaount create a container to new storage. And then you can be able to copy/move your vHDs in it. Emre Aydin emre.aydin@mshowto.org MSHOWTO.ORG

    • Anonymous
      April 15, 2016
      With the new Azure portal, how to create disks from vhd. thanks
  • Anonymous
    June 03, 2016
    The comment has been removed

  • Anonymous
    June 23, 2016
    The Copy paste or Move option is disabled in CloudBerry Explorer when i am trying to copy the container form "Move From" to "Move To" storage. why would that be disabled?

    • Anonymous
      October 27, 2016
      I have the same challenge. I do not see the copy and paste options enabled in my setup.
  • Anonymous
    September 01, 2016
    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

  • Anonymous
    September 24, 2016
    I used Azure Management Studio instead, as the Copy option was not selectable in Cloudberry, and it worked just fine, thanks!

  • Anonymous
    October 17, 2016
    Hi Guys,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.Looking forward to your support.Thanks,Gulab Pasha

    • Anonymous
      October 17, 2016
      I have posted the same on the following with more details.https://azure.microsoft.com/en-in/documentation/articles/resource-group-move-resources/#use-portal
  • Anonymous
    October 18, 2016
    The comment has been removed

  • Anonymous
    November 14, 2016
    For Virtual machines created by portal, there is functionality in azure portal to move VM from one subscription to another.https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-move-vm/

  • Anonymous
    December 16, 2016
    This post is great, much easier compared to others, thanks a lot, you made me save a lot of time!

  • Anonymous
    March 29, 2017
    I had problems with CloudBerry Explorer.. tried in two different computers in two different networks and couldn´t pass 39% on the transfer.. it was a 128 GB VHD file...

  • Anonymous
    March 29, 2017
    In time, I just found the Microsoft Azure Store Explorer and in the firts try, 100% success!