Reputation: 111
I am having a golden VM with 10 applications hosted in IIS and I create newer VMSS instance from the golden VM image for any major update in IIS(like adding new application,etc.) , I always create an new Image of my Golden VM (Specialized Image ) , but I'm unable to delete the Older Images which are no longer useful
Error while deleting old images :
Failed to delete VM image version ''. Error: 'No registered resource provider found for location '' and API version '2021-11-01' for type 'galleries/images/versions'.The supported api-versions are '2018-06-01, 2019-03-01, 2019-07-01, 2019-12-01, 2020-09-30, 2021-03-01, 2021-07-01, 2021-10-01, 2022-01-03, 2022-03-03, 2022-08-03'. The supported locations are 'westcentralus, southcentralus, eastus2, southeastasia, westeurope, westus, eastus, canadacentral, northeurope, northcentralus, brazilsouth, ukwest, westindia, eastasia, australiaeast, japaneast, koreasouth, westus2, canadaeast, uksouth, centralindia, southindia, australiasoutheast, japanwest, koreacentral, francecentral, centralus, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral, qatarcentral'.'
In Subscriptions-> My Tenant ID-> Resource Providers-> I tried looking for AzureComputeGallery to check if it is registered or not registered , but couldn't find anything
Upvotes: 1
Views: 505
Reputation: 954
Try this way to delete the Older Images
In order to delete the VM image, we could delete both image and associated VHD file as well use below PowerShell command to remove image the associated VHD;
Remove-AzureVMImage -ImageName <MyTestImage> -DeleteVHD.
NOTE: Make sure we are in same subscription where images are exists
Upvotes: 0