Hello, @lzap !
What does NotAvailableForSubscription
mean? How do I get a full list of all possible VM sizes?
I'm pretty familiar with NotAvailableForSubscription
and I'll give you a run down of possible causes as it covers quite a few scenarios.
The bad (or possibly good) news is you're using the best command available for the REST API that I'm familiar with as this is the command you'll see given in the documentation. I'll give you an Azure CLI equivalent for Resource Skus - List that may get you what you are looking for.
NotAvailableForSubscription
Currently, the most common reason for running into this is VM availability as described in the Microsoft Q&A sticky thread. This would explain why you would see sizes appear and disappear but there are a number of other reasons one might see this as well:
- There are no more of those VM SKUs available for your subscription in that region (see the Microsoft Q&A sticky for additional information)
- You have hit your core limit for that region (and need to increase your available quota)
- You are unable to create VMs in that region due to a policy created by your admin
- The VM size you are trying to use is not available for your subscription (free/student accounts, for example)
- The specific VM SKU you are trying to create has not been enabled for your subscription (you need to open a support ticket to enable that SKU)
- You are trying to deploy an Azure Spot VM or Spot scale set instance and there isn't additional capacity at that location
I'd offer to give more insight into QuotaId
but while I do see NotAvailableForSubscription
as a restriction on some VMs on my subscription, I do not see QuotaId
and like you I haven't been able to find much in the way of documentation online.
How do I get a full list of VM sizes?
To list all SKUs available in a region, you would use the az vm list-skus command (which does incorporate subscription level restrictions) or az vm list-sizes as an equivalent to the Resource Skus - List REST command. Here, I've used az vm list-sizes
. I hope this helps!
az vm list-sizes -l westus -o table