List Available VM Sizes in Azure Region Using Azure CLI

This Azure CLI post will show how to list all the available virtual machine sizes in a specific region.

If you have been using Azure you have probably seen the following error message when deploying VMs using Bicep, Terraform or PowerShell.

Inner Errors: 
{"code": "SkuNotAvailable", "message": "The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'westus'. Please try another size or deploy to a different location or different zone. See for details."}


To check which VMs are available in your region, run the following command with the region name next to the –location switch.

az vm list-sizes --location westus -o table

To check which SKUs are available under your subscription, run the following command with the VM serious type (Change the Standard_X type with the size you are after e.g. A,B,D,E, F)

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

Below you can see the output of the command and all sizes available in the region.

Success! You're on the list.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.