0
votes

I have some questions regarding Azure Managed Disks.

To my understanding, when a VM with managed disks is created the disks are in a Storage Account found suitable by Azure. The chosen Storage Account might not even be inside the same resource group as the VM.

What happens when I try to delete a Storage Account which has VHDs of managed disks inside it? What happens when I try to delete a Resources Group with Storage Accounts which has VHDs of managed disks?

Our flow, of dev/test, requires many Resource Groups and many Storage accounts. We need a way to both work with Managed Disks and be able to delete old Resource Groups with their Storage Account. Is this possible?

2

2 Answers

1
votes

I'm posting the the response I've got from Azure support, in case this helps someone in the future:

Managed disks are a managed service provided by Azure so that customers do not have to concern themselves with certain performance considerations, such as the amount of IOPS coming into a standard storage account or how many VHDs are being stored in one. When a managed disk is created, it is stored in an Azure storage account on the backend that is not accessible by the customer. The customer never receives the name of the storage account or the disk URI of where the underlying VHD is housed. A managed disk should be created into a resource group of your choosing, however, and can be deleted just like any other resource in it. To answer your questions, I will list them out:

What happens when I try to delete a Storage Account which has VHDs of managed disks inside it?

Managed disks are not stored in storage accounts managed by customers, so this will not be a scenario a customer must consider. This is only for unmanaged disks. All of your storage accounts will only house unmanaged disks.

What happens when I try to delete a Resources Group with Storage Accounts which has VHDs of managed disks?

Managed disks will delete just as any other resource would in a resource group. When they are deleted, the underlying VHD is simply removed from the backend storage account in Azure.

Our flow, of dev/test, requires many Resource Groups and many Storage accounts. We need a way to both work with Managed Disks and be able to delete old Resource Groups with their Storage Account. Is this possible?

You can definitely make this work with managed disks, I believe. Just treat the managed disks as their own entity and don’t worry about the underlying storage accounts on the backend. No storage accounts are needed on your end to have managed disks. Managed disks were created to simplify the management of the VHDs and storage accounts for virtual machines. If the managed disk exists, know it is being housed and managed on the backend appropriately. Delete managed disks as needed with resource groups, just like any other resource.

0
votes

What happens when I try to delete a Storage Account which has VHDs of managed disks inside it?

The storage account that Azure uses to place VHDs for the managed disks is transparent to you. In fact, you can't even see it using the portal or Storage Explorer, so you would not be able to delete a storage account that has your VHDs for managed disks.

What happens when I try to delete a Resources Group with Storage Accounts which has VHDs of managed disks?

They are removed.

We need a way to both work with Managed Disks and be able to delete old Resource Groups with their Storage Account Yes.