Update1: Virtual Machines has reached GA on April, 16th 2013.

Scenario:

After deleting a Windows Azure Virtual Machine you try to delete the blobs for the associated VHDs and receive the message below:

"There is currently a lease on the blob and no lease ID was specified in the request."

 

Root Cause:

When you delete a Virtual Machine on the Management Portal, the "Disk" resource used to mount the Virtual Machines VHD is kept.

The "Disk" resource is responsible for mounting the blob for the VHD file, so it can be attached to virtual machines as an OS Disk or Data Disk. It will continue to hold a lease on the blob for as long as it exists.

 

Resolution:

You need to delete the "Disk" resource to break the lease on the blob.

All Disks resources are found on the Management Portal under: Virtual Machines -> Disks

To delete the Disk resource follow the steps below:

  1. On the Azure Management Portal, navigate to Virtual Machines -> Disks
  2. Select the Disk you want to delete.
  3. Confirm there is no Virtual Machine listed on the "Attached to" column
    1. Disks are detached from a deleted VM asynchronously, it may take a few minutes after the VM is deleted for this field to clear up.
  4. Click "Delete" and choose if you want to "Retain the associated VHD" or "Delete the associated VHD"
    1. If you choose to "Retain the associated VHD" the lease will be removed but the blog containing the VHD will be kept in your Storage Account. You may choose this option if you plan to delete the VHD directly from your storage account VHDs container, create a new Disk pointing to the existing VHD, download to your on-premises environment or just leave it there for future use.

 

References:

How to Attach a Data Disk to a Virtual Machine
How to Detach a Data Disk from a Virtual Machine

 

Hope it helps.

Flavio Muratore
Sr. Support Escalation Engineer
Windows Azure Technical Support