Azure – Is it possible and how to download an Azure VM to local machine

azurevirtual-machines

I have a VM on Azure, it has many websites and databases with configurations which make it a little tricky to export everything from there.

Now I don't want any of these website to be running and for sure don't want to keep paying for an unused VM on Azure, I stopped the machine, but I am still getting billed because of the storage of the VM disks.

So my question:
How to download the whole VM so that I can back up somewhere else locally and be able to open it on my local machine latter if I needed to copy some files from there?

I have found some articles but because Azure is growing and changing too fast, I found them out dated and couldn't help me what I wanted to achieve.

Any advice or references are much appreciated.

Best Answer

It depends whether you are using Managed Disks or VHD based disks for your VM. If you are using Managed Disks (which is the default and best option to use) then you cannot download this directly, you would need to first export it to a VHD file in a storage account, and then download this VHD file. Managed disks can be exported using the portal (there is an "export" button when you click on the disk) or using PowerShell.

If your using VHD storage, or you have copied your managed disk to a VHD, then it is just a case of using tools like Azure Storage Explorer to connect to the storage account and download it.