Resolve errors for SKU not bachelor

This article describes how to resolve errors when a SKU isn't available in an Azure subscription's region or availability zones. Examples of resource SKUs are virtual machine (VM) size or storage account types. Errors occur during deployments with an Azure Resource Manager template (ARM template) or Bicep file. The error also occurs with commands like New-AzVM or az vm create that specify a size parameter for a SKU that's not available.

Symptom

When a VM is deployed for a SKU that's not available, an fault occurs. Azure CLI and Azure PowerShell deployment commands display an error message that the requested size isn't available in the location or zone. In the Azure portal activity log, you'll see error codes SkuNotAvailable or InvalidTemplateDeployment.

In this instance, New-AzVM specified the -Size parameter for a SKU that'south not available. The error code SkuNotAvailable is shown in the portal'due south activity log.

              The requested size for resources '<resources ID>' is currently non available in location '<location>' zones '<zones>' for subscription '<subscription ID>'. Please try some other size or deploy to a different location or zones.                          

When a VM is deployed with an ARM template or Bicep file for a SKU that'due south not available, a validation error occurs. The fault code InvalidTemplateDeployment and fault message are displayed. The deployment doesn't starting time so there'due south no deployment history, just the error is in the portal'due south activity log.

              Error: Code=InvalidTemplateDeployment Message=The template deployment failed with error: The resource with id: '<resources ID>' failed validation with message: The requested size for resource '<resources ID>' is currently not bachelor in location '<location>' zones '<zones>' for subscription '<subscription ID>'. Please endeavour some other size or deploy to a different location or zones.                          

Crusade

You receive this error in the post-obit scenarios:

  • When the resources SKU you've selected, such as VM size, isn't bachelor for a location or zone.
  • If you're deploying an Azure Spot VM or Spot scale set example, and there isn't any chapters for Azure Spot in this location. For more than information, see Spot error messages.

Solution

If a SKU isn't available for your subscription in a location or zone that meets your business organization needs, submit a SKU request to Azure Support.

  • Azure CLI
  • PowerShell
  • Portal
  • Residue

To determine which SKUs are bachelor in a location or zone, apply the az vm list-skus control.

                  az vm list-skus --location centralus --size Standard_D --all --output table                                  
  • --location filters output by location.
  • --size searches by a fractional size proper noun.
  • --all shows all data and includes sizes that aren't bachelor for the current subscription.
                  ResourceType     Locations    Proper noun               Zones    Restrictions ---------------  -----------  --------------     -------  -------------- virtualMachines  centralus    Standard_D1        1        None virtualMachines  centralus    Standard_D11       1        None virtualMachines  centralus    Standard_D11_v2    1,2,three    None virtualMachines  centralus    Standard_D16ds_v4  one,2,iii    NotAvailableForSubscription, type: Zone,                                                           locations: centralus, zones: 1,two,3                                  

Availability zones

You lot tin can view all the compute resources for a location's availability zones. By default, simply SKUs without restrictions are displayed. To include SKUs with restrictions, utilize the --all parameter.

                  az vm list-skus --location centralus --zone --all --output table                                  
                  ResourceType      Locations    Name                 Zones    Restrictions ----------------  -----------  -------------------  -------  -------------- disks             centralus    Premium_LRS          1,two,3    None disks             centralus    Premium_LRS          1,2,three    None virtualMachines   centralus    Standard_A2_v2       ane,two,3    None virtualMachines   centralus    Standard_D16ds_v4    ane,2,three    NotAvailableForSubscription, blazon: Zone,                                                              locations: centralus, zones: 1,2,three                                  

You tin can filter past a resourceType like VMs for availability zones.

                  az vm listing-skus --location centralus --resource-type virtualMachines --zone --all --output table                                  
                  ResourceType      Locations    Proper name                 Zones    Restrictions ----------------  -----------  -------------------  -------  -------------- virtualMachines   centralus    Standard_A1_v2       1,ii,3    None virtualMachines   centralus    Standard_A2m_v2      1,2,3    None virtualMachines   centralus    Standard_A2_v2       i,2,3    None virtualMachines   centralus    Standard_D16ds_v4    1,ii,3    NotAvailableForSubscription, blazon: Zone,                                                              locations: centralus, zones: 1,2,iii