Resolve errors for SKU not available

This article describes how to resolve the SkuNotAvailable error. If you're unable to find a suitable SKU in that region or an alternative region that meets your business needs, submit a SKU request to Azure Support.

Symptom

When deploying a resource (typically a virtual machine), you receive the following error code and error message:

Code: SkuNotAvailable
Message: The requested tier for resource '<resource>' is currently not available in location '<location>'
for subscription '<subscriptionID>'. Please try another tier or deploy to a different location.

Cause

You receive this error when the resource SKU you've selected (such as VM size) isn't available for the location you've selected.

Solution 1 - PowerShell

To determine which SKUs are available in a region, use the Get-AzComputeResourceSku command. Filter the results by location. You must have the latest version of PowerShell for this command.

Get-AzComputeResourceSku | where {$_.Locations -icontains "chinaeast2"}

The results include a list of SKUs for the location and any restrictions for that SKU. Notice that a SKU might be listed as NotAvailableForSubscription.

ResourceType          Name           Locations   Zone      Restriction                      Capability           Value
------------          ----           ---------   ----      -----------                      ----------           -----
virtualMachines       Standard_A0    chinaeast2             NotAvailableForSubscription      MaxResourceVolumeMB   20480
virtualMachines       Standard_A1    chinaeast2             NotAvailableForSubscription      MaxResourceVolumeMB   71680
virtualMachines       Standard_A2    chinaeast2             NotAvailableForSubscription      MaxResourceVolumeMB  138240

To filter by location and SKU, use:

$SubId = (Get-AzContext).Subscription.Id

$Region = "chinaeast2" # change region here
$VMSku = "Standard_M" # change VM SKU here

$VMSKUs = Get-AzComputeResourceSku | where {$_.Locations.Contains($Region) -and $_.ResourceType.Contains("virtualMachines") -and $_.Name.Contains($VMSku)}

$OutTable = @()

foreach ($SkuName in $VMSKUs.Name)
        {
            $LocRestriction = if ((($VMSKUs | where Name -EQ $SkuName).Restrictions.Type | Out-String).Contains("Location")){"NotAvavalableInRegion"}else{"Available - No region restrictions applied" }
            $ZoneRestriction = if ((($VMSKUs | where Name -EQ $SkuName).Restrictions.Type | Out-String).Contains("Zone")){"NotAvavalableInZone: "+(((($VMSKUs | where Name -EQ $SkuName).Restrictions.RestrictionInfo.Zones)| Where-Object {$_}) -join ",")}else{"Available - No zone restrictions applied"}

            $OutTable += New-Object PSObject -Property @{
                                                         "Name" = $SkuName
                                                         "Location" = $Region
                                                         "Applies to SubscriptionID" = $SubId
                                                         "Subscription Restriction" = $LocRestriction
                                                         "Zone Restriction" = $ZoneRestriction
                                                         }
         }

$OutTable | select Name, Location, "Applies to SubscriptionID", "Region Restriction", "Zone Restriction" | Sort-Object -Property Name | FT

The command returns results like:

Name                   Location  Applies to SubscriptionID            Region Restriction                         Zone Restriction                        
----                   --------  -------------------------            ------------------------                   ----------------     
Standard_M128          chinaeast2 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Available - No region restrictions applied Available - No zone restrictions applied
Standard_M128-32ms     chinaeast2 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Available - No region restrictions applied Available - No zone restrictions applied
Standard_M128-64ms     chinaeast2 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Available - No region restrictions applied Available - No zone restrictions applied

Solution 2 - Azure CLI

To determine which SKUs are available in a region, use the az vm list-skus command. Use the --location parameter to filter output by location. Use the --size parameter to search by a partial size name. Use the --all parameter to show all information, including sizes that aren't available for the current subscription.

You must have Azure CLI version 2.15.0 or later. To check your version, use az --version. If needed, update your installation.

az vm list-skus --location chinaeast2 --size Standard_F --all --output table

The command returns results like:

ResourceType     Locations       Name              Zones    Restrictions
---------------  --------------  ----------------  -------  --------------
virtualMachines  chinaeast2       Standard_F1                None
virtualMachines  chinaeast2       Standard_F2                None
virtualMachines  chinaeast2       Standard_F4                None
...
...

Solution 3 - Azure portal

To determine which SKUs are available in a region, use the portal. Sign in to the portal, and add a resource through the interface. As you set the values, you see the available SKUs for that resource. You don't need to complete the deployment.

For example, start the process of creating a virtual machine. To see other available size, select Change size.

Create VM

You can filter and scroll through the available sizes.

Available SKUs

Solution 4 - REST

To determine which SKUs are available in a region, use the Resource Skus - List operation.

It returns available SKUs and regions in the following format:

{
  "value": [
    {
      "resourceType": "virtualMachines",
      "name": "Standard_A0",
      "tier": "Standard",
      "size": "A0",
      "locations": [
        "chinaeast2"
      ],
      "restrictions": []
    },
    {
      "resourceType": "virtualMachines",
      "name": "Standard_A1",
      "tier": "Standard",
      "size": "A1",
      "locations": [
        "chinaeast2"
      ],
      "restrictions": []
    },
    ...
  ]
}