none
Unable to delete storae account

    Question

  • Hi,

    I am not able to delete the storage account in Azure getting following error.

    Error: The storage account cannot be deleted due to its artifacts being in use. For more information on troubleshooting this issue, see https://azure.microsoft.com/documentation/articles/storage-cannot-delete-storage-account-container-vhd

    I have already deleted all the resources in resource group and subscription, only left out with storage account.

    Any suggestions.

    Thanks,

    Wednesday, January 4, 2017 4:01 AM

Answers

  • The issue is resolved now. These are what i followed the steps:

    Create a new VM by selecting corruptive storage account(for VHD). Be sure to select exact Disk type(HDD/SSD) whichever was used while creating previously.

    After successful creation of VM and associated resources, delete VM again and all other associated resources followed by deleting storage account(Corrupt)

    Thanks,

    Alam


    • Marked as answer by Mohammed.Alam Friday, January 6, 2017 9:33 AM
    • Edited by Mohammed.Alam Friday, January 6, 2017 9:34 AM update
    Friday, January 6, 2017 9:33 AM

All replies

  • Hi Alam,


    Thank you for contacting Microsoft forums. We are pleased to answer your query.


    This error would occur if the storage account contains a VHD in a leased state. From the Azure Portal, can you g
    o to the storage account that you want to delete, and then select Blobs > vhds. Do you see any VHDs (artifacts) in there? If yes, let us know if the VHD is being used as an OS disk or a Data Disk. Or, you could simply delete the VHD(s) since you eventually wish to delete your storage account. It would also help if you could provide us a screenshot from the vhds blade.

    I hope that the reply will assist you in getting your query addressed. In case you require further assistance, please do reply to the thread as we are always available to your queries.



    Regards.

    Md. Shihab

    ********************************************************************

    Please remember to click "Mark as Answer" on the post that helps you as this can be beneficial to other community members reading the thread. And vote as helpful

    Wednesday, January 4, 2017 9:03 AM
  • Hello Shihab,

    I had already deleted all VHDs and containers. The Storage account is empty now and also there are no associated resources available in the resource group. Still issue persist. Please suggest

    Thanks,

    Wednesday, January 4, 2017 10:12 AM
  • Thanks for the confirmation, Alam. Could you please try to delete the Storage Account using Powershell. Here is the cmdlet for deleting an account. Give this a try and let us know how it goes.

    Regards.

    Md. Shihab

    Thursday, January 5, 2017 7:09 AM
  • PS C:\> Remove-AzureRmStorageAccount -ResourceGroupName tes*m -Name test****96

    Confirm
    Remove Storage Account 'test***96' and all content in it
    [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
    Remove-AzureRmStorageAccount : Operation returned an invalid status code 'Conflict'
    At line:1 char:1
    + Remove-AzureRmStorageAccount -ResourceGroupName test* -Name test**i ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Remove-AzureRmStorageAccount], CloudException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.RemoveAzureStorageAccountCommand

    Here is what i am getting when i ran through powershell.

    Friday, January 6, 2017 8:51 AM
  • The issue is resolved now. These are what i followed the steps:

    Create a new VM by selecting corruptive storage account(for VHD). Be sure to select exact Disk type(HDD/SSD) whichever was used while creating previously.

    After successful creation of VM and associated resources, delete VM again and all other associated resources followed by deleting storage account(Corrupt)

    Thanks,

    Alam


    • Marked as answer by Mohammed.Alam Friday, January 6, 2017 9:33 AM
    • Edited by Mohammed.Alam Friday, January 6, 2017 9:34 AM update
    Friday, January 6, 2017 9:33 AM
  • Glad to know your issue is resolved now, Alam.

    Regards.

    Md. Shihab

    Sunday, January 8, 2017 7:48 AM