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 https://aka.ms/azureskunotavailable for details."}
Command
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.

Leave a Reply