Tip: Error deleting VHD: There is currently a lease on the blob and no lease ID was specified in the request


If you encounter with this error while trying to delete a storage account most probably you’ve created a Windows Azure Virtual Machines and removed it.


When you create a Virtual Machine in Windows Azure, a bootable Virtual OS DISK has been created and attached to your Virtual Machine automatically. This OS DISK is stored in a storage account (you can select the storage account while creating your Virtual Machine).


You can use existing OS DISKs to recreate an existing Virtual Machines. For this purpose, if you delete a Virtual Machines OS DISK is not deleted automatically.


You’ll not see any Virtual Machines in your Windows Azure Management Portal but you can see your Virtual Disks, if you go to the DISKS section in Virtual Machines.


When you try to delete a storage account with an attached Virtual Disk you’ll get an error :

“Error deleting VHD: There is currently a lease on the blob and no lease ID was specified in the request”.

You need to remove attached Virtual Disks from your storage account by following these steps :

1. Go to the management portal (manage.windowsazure.com).

2. Click on Virtual Machines.

3. Click on Disks.

4. Click on the disk.

5. Click on Delete Disk.

Comments (4)

  1. thanks for the Tip!

    I am currently playing around with a azure subscription and I was having problems deleting the storage accounts created, till I found out this and understarnd that have all the disk of the VM created still there.

    Great info!

  2. Greg Bulmash says:

    Dude, you rock. I was looking for a solution to this and thought I was going to have to run this set of powershell scripts from a post on MSDN social. But your solution was WAY easier and it worked.

  3. DeptM says:

    Top – many thanks!