Member-only story

Resolving “VmSizeIsNotSupported” Error in ARM Template Deployment

Luca Berton
5 min readOct 5, 2024

The error you are encountering suggests that the specified VM size ($(vmSize)) is not supported in the selected region (eastus). The VM size needs to be corrected based on the supported sizes in the region.

Here is the error:

##[error]VmSizeIsNotSupported: Virtual machine size '$(vmSize)' is not supported in region eastus.

From the az vm list-sizes --location eastus --output table | grep Standard_B2 output, we can see that several sizes are available in the B2 family, such as:

  • Standard_B2als_v2
  • Standard_B2as_v2
  • Standard_B2ms
  • Standard_B2s
  • Standard_B2ls_v2
  • Standard_B2ps_v2

To resolve this error, you need to specify one of the available VM sizes for the eastus region in your ARM template or pipeline.

Step-by-Step Solution

Step 1: Update the ARM Template Parameter

Since the size you are passing ($(vmSize)) is not valid for the region, update the size parameter in the CreateVMTemplate.parameters.json file with a valid size. For example, you can use Standard_B2s, which is supported in the eastus

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet