How do I image an existing azure VM to use locally.

RJ Emmett 26 Reputation points
2023-01-03T17:13:37.893+00:00

Hello,

I'm using an azure Server 2019 Standard VM for a cloud backup solution. The costs for the storage drive on this VM is beginning to not make sense. I have hardware that I can use locally in my data center for this backup. I would like to image the VM, download image, install Image on my hardware (not VM). Think: azure disaster recovery to local hardware.

I have created an Image and it's sitting in my image gallery, but I would like to download/install it locally.

Is this even possible?
Can someone please explain what my next steps are?

Thank you in advance,
RJ

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,256 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 78,666 Reputation points
    2023-01-03T17:24:43.85+00:00

    Hi,

    In the portal, from the Deallocated VM, you could take a snapshot of the disk, next navigate to the snapshot -- Snapshot export -- generate URL, then use the url in your browser to download the VHD file. Once you've finished downloading you can delete the snapshot. If the Shared Access Signature (SAS) you created for the export is still valid you will need to cancel export on Snapshot Export before it will let you delete the snapshot.

    NOTE: the above is mainly about getting copy of VHD file downloaded. If your goal is more along the lines of getting a working VM in your local environment, then you will want to perhaps create a temporary VM from the snapshot, generalize it using sysprep, take temporary snapshot of it in generalized state, download temporary snapshot, delete temp VM/snapshot, make sure you have license/use rights to run VM locally, etc. You should test the complete process to make sure it works and you have the steps documented, then automate if desired.

    -TP

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. RJ Emmett 26 Reputation points
    2024-05-01T15:01:25.2233333+00:00

    @Martinus van Esch Yes, I was able to get it working, but not how I had hoped. I was hoping to image the VHD onto local hardware. However, I ended up installing Windows onto the new hardware, mount the VHD as a drive and extract the database I needed.

    I still think imaging local hardware is possible using an Azure VHD, but I wasn't able to do it at that time and needed to get this system up and running fast.

    If you've got the time you might try mounting the VHD, then use imaging software with the capabilities to create a bootable image of the mounted VHD drive. Then imaged this new image onto your hardware.

    Hope that helps you.

    0 comments No comments