Jaa


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

  • Anonymous
    April 07, 2013
    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!

  • Anonymous
    April 13, 2013
    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.

  • Anonymous
    July 21, 2013
    Thanks. It works!

  • Anonymous
    July 29, 2013
    Top - many thanks!