Forum Discussion
How to avoid "This Size is not available in zone. . ."
Hi Petri-X,
First of, to list what location are available for your subscription, use the following command:
Get-AzVMSize -Location westeurope | where-object {$_.name -EQ "Standard_D4_v5"}
Because Get-AzComputeResourceSku returns all the possible SKUs available for a location disregarding the limitations of your subscription. So, as a first troubleshooting step execute this command on both subscriptions to check if the SKU is available for the corresponding subscription.
Also it could be that some VM sizes are unavailable as there is currently high demand for VMs in certain regions (this is especially true for free trial accounts VM sizes). The solution is to create your VM resources in neighboring regions.
But the best solution I think, is to directly Contact Microsoft Support If a SKU isn't available for your subscription, submit a https://learn.microsoft.com/en-us/troubleshoot/azure/general/region-access-request-process to Azure Support.
- Petri-XDec 01, 2023Bronze Contributor
Big thanks samy_vanderspikken for your proposal. Need to play with them,
But as you said:
"Also it could be that some VM sizes are unavailable as there is currently high demand for VMs in certain regions"
I was not able to understand how this could be hapen:
# Set the Context to one of my subscription: PS C:\> set-azcontext -SubscriptionName mySub01 # Check the status: PS C:\> Get-AzComputeResourceSku -Location "westeurope" | Where-Object { $_.name -EQ "Standard_D4ls_v5" } ResourceType Name Location Zones RestrictionInfo ------------ ---- -------- ----- --------------- virtualMachines Standard_D4ls_v5 westeurope {3, 2, 1} type: Zone, locations: westeurope, zones: 1 # Set the Context to one of my subscription: PS C:\> set-azcontext -SubscriptionName mySub02 # Check the status: PS C:\> Get-AzComputeResourceSku -Location "westeurope" | Where-Object { $_.name -EQ "Standard_D4ls_v5" } ResourceType Name Location Zones RestrictionInfo ------------ ---- -------- ----- --------------- virtualMachines Standard_D4ls_v5 westeurope {1, 2, 3} type: Zone, locations: westeurope, zones: 3
As you see, by changing only the subscription that affects to the availability:
RestrictionInfo: Zones: 1
RestrictionInfo: Zones: 3
I though to ask this from Microsoft as well, but thought to ask here if there is something which I do not know.
- kiweeziApr 09, 2024Copper ContributorAs it has been said, I think this is due to the demand for that sku in the specific zone.
As to the reason why it shows a different zone in a different subscription:
When a subscription is first created, it maps to a fixed set of zones, that aren't neccessarily the same as another subscription in the same location. I don't think it is known how the subscription picks the zones to map to, or in what order to do it.
This means a subscription 'sub1' zone 1 could be the same as another subscription 'sub2' zone 3, etc.
That might describe the behaviour you're seeing. The command is showing a shortage of VMs in the same zone, it's just each subscription has mapped the zones in a different order.
Appreciate it's been sometime since this was posted.