There are times and scenarios when you want to delete your instance of Windows Azure Virtual Machines and everything associated with it. Though deletion of virtual machine is quite simple to achieve, you will probably encounter an error when deleting the associated storage account.

And this error request will most likely resemble this;

Failed to delete Storage account 'abcdwxyz'

Details:

Storage account abcdwxyz has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

 

On perhaps something like;

Submit Failed

Storage account abcdwxyz has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

 

And if you try to delete the blob itself on Azure Storage Explorer, you might get this error:

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

 

So, how would you delete this blob and the storage account itself?

 

To delete your storage account, you need to delete the container which has an active disk artifact from the repository. To remove the disk image you must;

  • Go to the Windows Azure Management Portal.
  • Click on Virtual Machines.
  • Click on Disks.
  • Click on the disk.
  • Click on Delete Disk.

Once the disk is deleted you can delete the storage account. This will work even if you have already deleted Virtual Machines. However, it may take few minutes before the disk is completely detached from the virtual machine.