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.
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.