5

When trying to delete Azure Resource Group in the Azure Portal I get an error pointing to a Storage Account which could not be deleted.

Indeed, trying to delete the Storage Account results in an error:

Failed to delete storage account 'clie6aa7aa53aa7ace414833'. 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/

The article is not helpful, I have already deleted all blobs and files. There are no remaining containers on the SA:

enter image description here

When trying to delete from PowerShell I get:

PS C:\> Remove-AzureRmStorageAccount -ResourceGroupName myresourcegroupname001 -StorageAccountName cl
i6c4ccaf5d718f00c14833

Confirm
Remove Storage Account 'cli6c4ccaf5d718f00c14833' 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 myresourcegroupname00 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureRmStorageAccount], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.RemoveAzureStorageAccountCommand

Currently I have two such undeletable, empty storage accounts - one of which remains for over 72 hours.

Is there anything I can do to delete this Storage Account?

3

I had the same problem that went on for several days. I was eventually able to resolve the problem by doing the following:

  1. Create a new VM (in my case an Ubuntu VM with SSD) in the same Resource Group as the problematic Storage Account
  2. Add the drive to the same Resource Group, same region, etc
  3. Delete the new VM, then delete the VHD container for the VM in the problematic Storage Account
  4. Remove the problematic Storage Account
  • 1
    I would just simplify the point 2. of your answer to "selected the problematic Storage Account for the new VM". – techraf Jan 4 '17 at 10:26
  • Made some small edits to your answer to make it easier to read. Feel free to adjust / roll back / yell at me. – Reaces Jan 4 '17 at 12:23
  • I had high hopes for this but I am unable to delete still after attempts with powershell, cli, portal, classic portal, storage manager app, re-creating the vm, etc. It's on my MSDN account so no tech support but I did open a case with manage subscription (yes I know wrong department but not much other choice). My VHD is gone but still get the error: Failed to delete resource group linux-playground: The storage account cannot be deleted due to its artifacts being in use. – Shawn Jun 30 '17 at 14:47
0

Afaik, this could happen when you delete the Virtual Machine, but there is a disk associated to it, an it creates an artifact under the disk tab.

As this article says https://redeploy.se/break-remove-lease-azure-blob/,

When working with Resource Manager (ARM) virtual machines the disks are not seen in the classic portal.

So it possibly can be a disk underneath a ARM, if all the articles about Storage Account troubleshooting aren't helpful, you can contact Azure support.

  • I have written "I had already deleted all blobs" and even included a screenshot showing there are no blobs. And I am using Azure Portal. – techraf Jan 3 '17 at 13:38
0

AFAIK It's a common error. Your vhd is in this storage account, that's why you can't remove it, without delete the vhd.

https://stackoverflow.com/a/10969013/1384539deleting

Solution: deleting the disks can be done via the previous version of the portal manage.windowsazure.com Virtual Machines -> Disks

  • 2
    When I open manage.windowsazure.com and go to Virtual Machines -> Disks, I see a message on the screen: "No disks have been created. To get started, click Create a disk."- what shall I do next? – techraf Jan 3 '17 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.