Nota: Este artigo foi publicado originalmente em 2013. Alguns passos, comandos ou versões de software podem ter mudado. Consulte a documentação atual de Windows Azure Cloud para as informações mais recentes.
If you’re encountering this issue, this troubleshooting guide will help you identify the root cause and apply the appropriate fix. This applies to Windows Azure Cloud environments.
Error deleting (http://en.wikipedia.org/wiki/VHD_%28file_format%29 “VHD (file format)”): 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 (http://www.microsoft.com/WINDOWS “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 (http://en.wikipedia.org/wiki/Virtual_machine “Virtual machine”). 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:
- Go to the management portal (manage.windowsazure.com).
- Click on Virtual Machines.
- Click on Disks.
- 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.
- Click on Delete Disk.
Resumo
This guide covered the common causes and solutions for this Windows Azure Cloud issue. If the problem persists, check the official documentation or system logs for additional diagnostic information.