Error: 'There is currently a lease on the blob and no lease ID was specified in the request.' RRS feed

  • Question

  • I am trying to delete a storage account in the Premium LRS group. I deleted the VM and this storage account is a remnant.

    The error is 'Storage account XXXXXX has some active image(s) and/or disk(s), e.g. XXXXXX-XXXXXX-os-1447372084611. Ensure these image(s) and/or disk(s) are removed before deleting this storage account.'.

    When I try to delete the blob, I get this error:

    Failed to delete blob 'vhds/XXXXXX-XXXXXX-os-1447372084611.vhd'. Error: 'There is currently a lease on the blob and no lease ID was specified in the request.

    If I try to delete the container the error is:

    Failed to delete storage container 'vhds'. Error: 'There is currently a lease on the container and no lease ID was specified in the request.'

    This account is now costing me every month and I cannot delete anything.

    Thursday, December 10, 2015 5:00 AM

All replies

  • Hi Steve,

    when did you delete your VM? Just right now? b/c it might take some time until the VM (blob) is "fully" removed and access to the storage account is released. It should not take too long: can you please re-check if you delete your storage account now?

    VM Images could also cause this issue: please make sure that you haven't created any additional VMs images that are stored in your storage account you want to delete (http://blogs.msdn.com/b/cie/archive/2015/02/19/not-able-to-delete-storage-account-ensure-these-image-s-and-or-disk-s-are-removed-before-deleting-this-storage-account.aspx)

    Just for double-checking purposes here http://stackoverflow.com/questions/10969012/how-do-i-delete-an-azure-storage-account-containing-a-leased-blob you'll find other scenarios that caused the issue you described. please see if these help.


    Thursday, December 10, 2015 8:07 AM
  • Hi Oliver,

    The VM was deleted a month ago.  I have regularly tried to delete the blob and storage account since then without success.



    Thursday, December 10, 2015 8:35 PM
  • Steve, can you please have a look at this blog http://blogs.msdn.com/b/mast/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx and try to delete the VHD as described there!


    P.S: If I was able to answer your question please markt this as an answer. This will help other forum members to quickly identify helpful guidance for similar issues.

    Friday, December 11, 2015 10:22 AM
  • Hi Steve,

    Where you able to fix your issue or where we able to answer your question? If one (or multiple) of the answers below helped to answer your question, please mark all of them as an answer to your question (even if the answer was not a positive one).

    This will enable other forum members to immediately see which of the answers helped to resolve your issue/question.

    If you still have some issues please let us know - just post your comment in this forum!

    Many thanks,Oliver

    Tuesday, December 15, 2015 7:23 AM
  • Hi,

    i have same problem too. I can not delete virtual disk file. It is not attached to any VM.

    Old azure portal not allow to manage storage account that is Premium LRS. 

    Wednesday, February 3, 2016 7:48 PM
  • Download the scriptBreakBlobLease.ps1 from "How to break the locked lease of blob storage in Microsoft Azure (PowerShell)" 


    Run the script Example 1: Type C:\Script\BreakBlobLease.ps1 -StorageAccountName "storageaccount" -ContainerName "vhd" -BlobName "3lfvawwo.p4j201403200630470102.vhd" command in the Windows PowerShell Console.

    Then you will be able to delete the blob from Management portal Azure > Storage Account >  Blob Service > Container

    Thursday, April 21, 2016 11:52 AM