Azure unmanaged disk - unable to delete mapped drive in VM

Andy Pospiech 21 Reputation points
2021-01-18T14:53:51.733+00:00

I can't delete an unmanaged disk that was created in Azure and mounted as d: drive in VM with Windows Server 2016.

The VM's "Disk" list shows no disk under LUN heading. Yet, when I go to the VM, the Explorer shows d: drive mounted and fully available for file I/O. I tried to unmount and delete the d: drive without success in Explorer and PowerShell.

In Server Manager, an attempt to take the d: drive offline generates error: "Failed to bring disk offline - Operation not supported on critical disk.

In Server Manager, an attempt to delete the volume on d: drive generates error: "Error deleting volume - The operation is not allowed on a system or critical partition.

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
572 questions
0 comments No comments
{count} votes

Accepted answer
  1. SUNOJ KUMAR YELURU 13,941 Reputation points MVP
    2021-01-18T14:58:48.527+00:00

    @Andy Pospiech

    Suggest to turn-off the VM
    Delete unmanaged disk from azure portal
    Turn-ON VM and check disk is available in 'disk manager'

    Please don’t forget to Accept the answer and up-vote wherever the information provided helps you, this can be beneficial to other community members.


2 additional answers

Sort by: Most helpful
  1. deherman-MSFT 33,626 Reputation points Microsoft Employee
    2021-01-19T17:52:37.773+00:00

    @Andy Pospiech
    Since the disk is not viewable in the portal it sounds like it might be the temporary disk. Can you double check your VM size and see if that is the case?

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Andy Pospiech 21 Reputation points
    2021-01-25T15:09:04.163+00:00

    Now, I understand how disk creation works in Azure. Azure creates OS disk and mounts it on c: drive and it also creates a temporary disk of 32 GB that it mounts on d: drive. It was a coincidence that I created an additional disk, which I was planning to mount on d: drive. So, I was confused when I saw three disks on the newly created VM and two of them were of 32 GB capacity. I though that I mistakenly created two disks and then I proceeded to delete disk in the Azure, which left me with two disks. I understand it now that I can't remove this temporary disk mounted on d: drive as it is used by VM for page and swap files.

    0 comments No comments