0
votes

I have created a custom managed image in Azure and it is there in the images menu. Is it possible to back it up or put delete protection etc or to store the image somewhere else.
Because If the subscription is cancelled or deleted, all these images also will be deleted as far as my understanding.
Or is there any best practices to save the image.
Thanks in advance.

1
A doc said before cancel the subscription, 'If you have a virtual machine, save an image of it locally.' And when you create a managed image in a resource group, you cold add a lock for the group so that the resource in it can't be deleted(See resource group>locks>add delete lock)tiny-wa
Point noted. Thanks! @Tiny-wasmootherbug
Thanks for response, and you can take a try of the lock. If it meets your requirement, pls also let us know so that it may help others.tiny-wa
@Tiny-wa, delete lock works fine. So if i cancel the subscription, it will not allow me to do so or it will override the lock.smootherbug
I've never cancel a subscription, and I think if a subscription is cancelled, the resources in it will be removed after a period of time, so you need to do a back up action before cancel subscription like Nancy said in the answer below.tiny-wa

1 Answers

0
votes

As @Tiny-wa's comment points out, you can lock the image resource via the Azure portal from image--->Locks--->Add--->set the delete lock to prevent the image to be deleted unexpectedly.

There is not a direct feature to backup a managed image in Azure. If you want to save the image content, you need to download the VHD file from the source VM OsDisk and dataDisk or the snapshots of the source VM to your local VM. You also could upload the VHD file to a file share or your managed Azure storage account. Read Download a Windows VHD from Azure for more details.

enter image description here