-1

I had some Azure resources (classic) that I deleted. For some reason, some blobs were not deleted on that storage account due to locking issues, so I used the cli to unlock the remaining blobs and delete their containers. I now have empty storage accounts. However, when I try and delete my storage accounts through the portal, I get the following error:

Failed to delete storage account 'portalvhdsn4k00gzzhv88l'. Unable to delete storage account 'portalvhdsn4k00gzzhv88l': 'Storage account portalvhdsn4k00gzzhv88l has some active image(s) and/or disk(s), e.g. traffic-traffic-0-201509110310570061. Ensure these image(s) and/or disk(s) are removed before deleting this storage account.'.

When I run azure storage account delete portalvhdsn4k00gzzhv88l, it errors with:

error: Resource group 'portalvhdsn4k00gzzhv88l' could not be found.

How do I force delete the account?

twinlakes
  • 9,438
  • 6
  • 31
  • 42
  • 1
    Not sure it's *exactly* the same cause, but take a look at [this answer](http://stackoverflow.com/a/34364494/272109) I posted about removing the associated Disk objects, which must be done before deleting a storage account. – David Makogon Sep 08 '16 at 05:24
  • That was the issue. I'm not sure why those didn't show up through the other parts of the UI. – twinlakes Sep 08 '16 at 06:21

2 Answers2

0

The only way to do this is on the classic portal

  1. Go to manage.windowsazure.com
  2. Click On Virtual Machine
  3. Click On disks
  4. Delete

You cant do this on the ARM portal.

S A
  • 827
  • 10
  • 23
0

error: Resource group 'portalvhdsn4k00gzzhv88l' could not be found.

If you want to manage classic resource via Azure CLI, please setting your azure CLI mode as asm via this code azure config mode asm. After doing this, we will not need to provide the resource group name.

enter image description here

As David said, we need to remove the associated Disk object for deleting a storage account, so please list vm disk via azure vm disk list. Then use azure vm disk delete <disk name existed in your storage account>. After that we will be able to delete the account successfully via azure storage account delete <storage account>.

Jambor - MSFT
  • 3,175
  • 1
  • 13
  • 16