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

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 it is because you created a Windows Azure Virtual Machine and removed it. In my case I was deleting a bunch of VMs and Windows Azure is set up to conserve the Hard Drive. (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.) The result is a bunch of hard drives in your storage account that if you try to delete directly from the storage account you might run across a  “There is currently a lease on the Blob” error. Sure enough after a while the lease is released and you can delete it from the Storage Account but there is a better way:

If you go to the Disks section in Virtual Machines you can see the left over disk. So the way to go is to delete the Virtual Disk and from there the linked Blob in storage:

  1. Go to the management portal (manage.windowsazure.com).
  2. Click on Virtual Machines.
  3. Click on Disks.
  4. Click on the Disk you are trying to delete. You can see there all the Disks that are not attached to a VM at the moment.
  5. Click on Delete Disk.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.