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.
- Deallocate the VM
- Select the VM in the portal
- Click the Stop button
This deallocates that machine rather than just an OS shutdown command
- Navigate to the disk you wish to export as a .VHD
- In the left menu, select Disk Export
- 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.- A URL is generated to download the .VHD
- 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.