A quick tip for anyone who gets stuck when trying to delete an Azure Blob Storage Container that appears to be empty but upon deletion generates the following helpful error message

There is currently a lease on the container and no lease ID was specified in the request…

You’ve looked and there are no VHD or other objects appearing in this Container and you have found that you are unable to change the lease settings on the Container (yes, you can read them but you can’t update or remove them).

This is a little gotcha and is all down to Virtual Machine Images.

If you have created any Machine Images their VHDs will be held in a Blob Container but will not show up as other blobs – you will need to switch to the Virtual Machines > Images tab (shown below as I delete my old Images) in order to delete or otherwise update the Image so you can remove the Container.

Delete VM Images

Hope this helps you save a few minutes in your day!

Azure Infrastructure, Cloud Infrastructure
, ,

Join the conversation! 8 Comments

  1. I was getting the same error and had to open a tech support ticket each time. It took several days them to figure out. It was this summer so maybe they learned how to fix the cause.

  2. Thanks, mate, you’ve really helped me. Cheers

  3. Create a new VM pointing to the existing VHD if you have more VHD with the same problem you may atach one to this VM. When you are finish delete the virtual machin MAKE SURE you delete the atthached VHDs.

  4. Thanks for this. If anyone is looking where to find Images under the new Windows Azure portal, you need to navigate to ‘VM Images (classic)’, since you can no longer find it under ‘Virtual Machines’ or ‘Virtual Machines (classic).

  5. Thank you. This was a mystery before finding your post.

  6. Hi, am unable to delete dellocated VHD from ARM portal,
    now is this chargeable if yes how it can be deleted

Comments are closed.