Problem: Azure does not allow you to remove blobs from your storage account when a lease exists
Solution: Install the tool “Windows Azure Virtual Hard Disk (blob storage) Cross Account Copy, Lease Break, and Management Tool”
Download URL:


Unpack the package and edit VHDandVMTool.exe.config in the Executable directory.

Enter your storage account Primary connection string.
You can find this string at
The path is Browse/Storage accounts (classic)/Select your storage account/Click All settings/Click Keys

<!-- Enter the Source Storage Account Details here. Used for VHD Operations-->
<add key="SourceStorageConnection" value="DefaultEndpointsProtocol=https;AccountName=portalvhdsnnnn;AccountKey=nnnn==" />

Start up the tool and click “START QUERY”.
At this point you will receive an error message but you can click Continue.


The list of your VHD’s will be shown.
Select the VHD which lease you want to break.
Click “Break VHD Lease”

Install the Microsoft Azure Storage Client Library for Node.js

$ npm install --global azure-storage

After this you can use azure-storage to delete your VHD.

$ set AZURE_STORAGE_ACCOUNT=portalvhdsnnnn
$ azure storage blob delete --container vhds <VHDNAME>