Delete disk from Azure and Resource Group

Stephen Weber 351 Reputation points
2023-02-15T14:25:50.1633333+00:00

When I search in the DISKS area, I see several additional disks which do not have owners and are listed as unattached. When I examine the names, these appear to be from VMs which have been deleted. When I attempt to delete one of theses disks, I get an error messages saying that the drive is locked.

"Failed to delete disk 'XXXSQL10_DataDisk_0'. Error: The scope 'XXXSQL10_DataDisk_0' cannot perform delete operation because following scope(s) are locked: 'Servers'. Please remove the lock and try again.

I checked the "Lock" option and this doesn't look like the right option, it appears to prevent the resource group itself from being deleted and perhaps not items in that group such as a disk.

The ends of this all is that I would like to delete these disks which are no longer need. Any help would be appreciated.

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

Accepted answer
  1. Sam Cogan 10,812 Reputation points Microsoft Employee Volunteer Moderator
    2023-02-15T14:41:27.1466667+00:00

    If you are looking at the disks in the portal, and you see a lock in the "locks" tab, then this is locking the disks and will need to be removed before deleting. Locks can be applied at the RG that apply to sub items.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.