Extracting a VHD from a Managed Disk in Azure

Category:General PostTag: , , :

I recently needed to do something a little different with a managed disk attached to my running Azure VM. I wanted to get a disk from the VM as a local VHD file. Here are the steps I used.

  1. Deallocate the VM
    1. Select the VM in the portal
    2. Click the Stop button
      This deallocates that machine rather than just an OS shutdown command
  2. Navigate to the disk you wish to export as a .VHD
  3. In the left menu, select Disk Export
  4. Click the “Create URL” button
    It’s important to note you’ll only be able to download this VHD for a limited time. The default is 1 hour, but you can change that.
    1. A URL is generated to download the .VHD
    2. A link is provided to download immediately from this page.

Another option is to have the VHD moved into a storage account. There is a script to do that here.