Azure: Search for a specific VM series availability in region

Use Azure CLI to retrieve available VM SKUs (sizes) in a specified region, filter them by a VM type, and formats the output.

In this specific case, I am checking whether the E20as_v6 and E20s_v6 sizes are available in the eastus2 region and determining the zones in which they are offered:

mari@Azure:~$ az vm list-skus --location eastus2 --all true --resource-type virtualMachines --output table | grep -E "E20as_v6|E20s_v6"

virtualMachines eastus2 Standard_E20as_v6 1,2 None
virtualMachines eastus2 Standard_E20s_v6 1,2 None

Explanation of command/options:

Command/OptionDescription
az vm list-skusLists available VM SKUs (sizes)
--location eastus2Specifies the Azure region (eastus2) where the VM SKUs should be retrieved.
--all trueShow all information including vm sizes not available under the current subscription.
--resource-type virtualMachinesFilters the SKU list specifically for virtual machines.
--output tableFormats the output into a readable table format instead of JSON.
| grep -E "E20as_v6|E20s_v6"Pipes (|) the output into grep, filtering only the lines containing E20as_v6 or E20s_v6.

Explanation of the result:

ValueDescription
NoneThis column usually shows restrictions, such as NotAvailableForSubscription. Here, “None” means no restrictions apply, and the VM SKU can be deployed without limitations.
1, 2VMs are available in 1 and 2 availability zones

E-Series VMs are optimized for memory-intensive workloads such as in-memory databases, and big data applications.

Install azcli on Linux

0. Import gpgkey

$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  1. Create local azure-cli repository information.
# sh -c 'echo -e "[azure-cli]
name=Azure CLI
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'


2. Install with the yum install command.

$ yum install azure-cli

3. Run the login command.

$ az login

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code MYCODEHERE to authenticate.

4. Go to https://microsoft.com/devicelogin and enter the mentioned code

5. Click Next -> choose your account.