locked
Unable to delete VHD or find the option to do it RRS feed

  • Question

  • From Corey Kaylor @katokay via Twitter:
     
    There doesn't seem to be a way for me to delete the storage. Tried the cli tools with no success. There isn't an option to delete the disk through the portal that I've found. I deleted the virtual machine associated with the disk. It failed with an error to delete the disk. The VM is gone, but disk is left around. Only place disk is visible to me is through cli, or the OS disks (classic)... There is no option to delete it that I can see from there though.  But, there's obviously something I could be missing.  

    The customer has also sent us this link: http://blogs.msdn.com/b/mast/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx

    Thanks,
    @AzureSupport

    Monday, November 16, 2015 4:20 PM

Answers

  • Hello Corey,

    From what i understand, you are trying to delete the VHD for the VM from this storage account and it is failing.

    Please let me know more details to proceed further.

    1) Have you tried deleting  another test VM in the same storage account? Please follow the below article for the same:-

    http://blogs.msdn.com/b/mast/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx

    2) Are you keeping the disk or selecting the option "Delete the Associated VHD"?

    3) Did you tried deleting from a different browser?

    4) Have you tried deleting the vhd using powershell?

    Try this command Remove-AzureDisk <yourDiskName>

    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2012/09/19/how-to-remove-an-orphaned-windows-azure-virtual-machine-disk-and-remove-a-lease-conflict-on-a-vhd-blob.aspx

    5) Go to Storage>Container>Vhd's>select the appropriate vhd that you want to delete and click delete button.

    Disclaimer

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Regards,

    Dipin Mathew.


    • Edited by Dipin M Monday, November 30, 2015 4:55 PM
    • Proposed as answer by CoreyKaylor Monday, November 30, 2015 11:46 PM
    • Marked as answer by Syed Irfan Hussain Tuesday, December 1, 2015 8:02 AM
    Monday, November 30, 2015 4:52 PM

All replies

  • What happens if you try to remove the OS disk from the portal ?

    Did you tried to break the lease via Powershell ?

    http://mythoughtsonit.com/2013/01/how-to-delete-vhd-files-in-azure-with-powershell-part-18-of-31-days-of-servers-in-the-cloud-series/


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com buildwindows.wordpress.com &lt;/a&gt;

    Monday, November 16, 2015 4:29 PM
  • Just tried that. No it didn't work. The blob is still registered as an OS image with the name '...' Please delete the OS image first.

    There's nothing I see or have access to that will do that though.

    Friday, November 20, 2015 6:03 PM
  • Hello Corey,

    From what i understand, you are trying to delete the VHD for the VM from this storage account and it is failing.

    Please let me know more details to proceed further.

    1) Have you tried deleting  another test VM in the same storage account? Please follow the below article for the same:-

    http://blogs.msdn.com/b/mast/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx

    2) Are you keeping the disk or selecting the option "Delete the Associated VHD"?

    3) Did you tried deleting from a different browser?

    4) Have you tried deleting the vhd using powershell?

    Try this command Remove-AzureDisk <yourDiskName>

    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2012/09/19/how-to-remove-an-orphaned-windows-azure-virtual-machine-disk-and-remove-a-lease-conflict-on-a-vhd-blob.aspx

    5) Go to Storage>Container>Vhd's>select the appropriate vhd that you want to delete and click delete button.

    Disclaimer

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Regards,

    Dipin Mathew.


    • Edited by Dipin M Monday, November 30, 2015 4:55 PM
    • Proposed as answer by CoreyKaylor Monday, November 30, 2015 11:46 PM
    • Marked as answer by Syed Irfan Hussain Tuesday, December 1, 2015 8:02 AM
    Monday, November 30, 2015 4:52 PM
  • The issue looks like it stemmed around somehow using the preview of the new azure portal. I don't remember opting to try it, but I'm sure it's possible I did. After a long period of not logging in during the holiday I came back this week and tried your suggestions and the portal was no longer the preview portal. This allowed me to follow the instructions on step 1 to remove the disk. This option no longer seems to exist in the preview of the newer portal. Meanwhile, I just assumed most of the blog posts were outdated with regard to the UI steps involved not realizing they were still relevant and I was just using the wrong version of the portal.

    Thanks for the help

    Monday, November 30, 2015 11:46 PM