Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+3 votes
5 views
in Azure by (1.2k points)

How can I delete the associated account with the virtual machines

On the preview portal on deleting the storage account I got this error:

 

Failed to delete Storage account 'portalabcd'

Details:

Storage account portalabcd has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

On the previous portal I got this error:

Submit Failed

Storage account portalabcd has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

And on trying to delete the blob I get this error:

There is currently a lease on the blob and no lease ID was specified in the request.

The conclusion is that the blob is leased and I can't delete it unless I've the lease ID

Now, how can I delete the blob and the storage account as well.

2 Answers

+11 votes
by (10.5k points)
  • To remove disk image from the blob repository:

1. Go to the Windows Azure Management Portal.

2.Select Virtual Machines.

3. Click on Disks.

4. Select the disk to be deleted.

5. Click on Delete Disk.

Now, the storage account can be deleted

Please note:

  • It is applicable even if you've already deleted all of your Virtual Machines and it shows 0; there still will be artefacts under the disks tab.

  • Disks are detached from a deleted VM asynchronously, it may take a few minutes after the VM is deleted for this field to clear up.

0 votes
by (5.8k points)

If you are unable to delete storage could because of vmimages.

Want to learn Azure from basics! Refer to this really informative video on Azure provided by Intellipaat:

Then try using power shell commandn like this:

get-azurevmimage | Where-Object -Property Category -in -Value "user"

To list all images To delete ALL YOU IMAGES use the following script:

get-azurevmimage | Where-Object -Property Category -in -Value "user" |   

foreach {

        echo "remove $($_.ImageName)"

        Remove-AzureVMImage –ImageName $($_.ImageName)

        }

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...