Forum Discussion
Petri-X
Nov 30, 2023Bronze Contributor
How to avoid "This Size is not available in zone. . ."
Hi, Anybody has found the optimal solution to avoiding the following text, when selecting the VM on Azure: This size is not available in zone 2. Zones '1' are supported. Of course the zone numbers...
Petri-X
Dec 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.
kiweezi
Apr 09, 2024Copper Contributor
As 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.
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.