Azure: Find the number of Fault Domains for region

A fault domain is a logical grouping of hardware within a data center that shares a common power source and network switch.

In cloud environments like Microsoft Azure or Oracle Cloud, fault domains help improve high availability by ensuring that resources (like virtual machines) are distributed across isolated hardware. This way, if a failure occurs in one fault domain (e.g., a power outage or hardware failure), it doesn’t affect the other domains.

In clustered environments such as Oracle RAC and others, it is highly recommended to distribute database nodes across different Availability Zones (preferably within close proximity). However, if the selected region does not support Availability Zones, or if the network latency between AZs is too high, you can instead distribute the nodes across different fault domains to ensure fault tolerance at the power and network switch level.

To verify how many fault domains are supported in your chosen region, run the following script from Azure CLI:

az vm list-skus --resource-type availabilitySets --query '[?name==`Aligned`].{Location:locationInfo[0].location, MaximumFaultDomainCount:capabilities[0].value}' -o Table

The output by June 11, 2025, is as follows (subject to change in the future):

Location            MaximumFaultDomainCount
------------------ -------------------------
AustraliaCentral 2
AustraliaCentral2 2
australiaeast 2
australiasoutheast 2
AustriaEast 2
BelgiumCentral 2
brazilsouth 3
BrazilSoutheast 2
CanadaCentral 3
CanadaEast 2
CentralIndia 3
centralus 3
CentralUSEUAP 1
ChileCentral 2
DenmarkEast 2
eastasia 2
eastus 3
eastus2 3
EastUS2EUAP 2
EastUSSTG 1
FranceCentral 3
FranceSouth 2
GermanyNorth 2
GermanyWestCentral 2
IndonesiaCentral 2
IsraelCentral 2
IsraelNorthwest 2
ItalyNorth 2
japaneast 3
japanwest 2
JioIndiaCentral 2
JioIndiaWest 2
KoreaCentral 2
KoreaSouth 2
MalaysiaSouth 2
MalaysiaWest 2
MexicoCentral 2
NewZealandNorth 2
northcentralus 3
northeurope 3
NorwayEast 2
NorwayWest 2
PolandCentral 2
QatarCentral 2
SouthAfricaNorth 2
SouthAfricaWest 2
southcentralus 3
SouthCentralUS2 2
SouthCentralUSSTG 2
southeastasia 2
SoutheastUS 2
SoutheastUS3 2
SoutheastUS5 2
SouthIndia 2
SouthwestUS 2
SpainCentral 2
SwedenCentral 3
SwedenSouth 2
SwitzerlandNorth 2
SwitzerlandWest 2
TaiwanNorth 2
TaiwanNorthwest 2
UAECentral 2
UAENorth 2
uksouth 2
ukwest 2
westcentralus 2
westeurope 3
WestIndia 2
westus 3
westus2 3
WestUS3 3

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.

Azure CLI install ssh extension

Problem:

To enable AD authentication on a Linux OS Azure VM, you must install Azure CLI and have the SSH extension. However, the SSH extension is not installed automatically after installing Azure CLI.

I can guide you through the simple steps to add this extension.

Solution:

Ensure that the extension is not present:

~ az version
{
  "azure-cli": "2.49.0",
  "azure-cli-core": "2.49.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {}
}

List available extensions:

~ az extension list-available --output table

Name    Version    Summary  Preview  Experimental  Installed
------- --------   -------  -------  ------------  --------------------------
...
ssh     1.1.6      SSH...   False    False         False
...

Add extension:

~ az extension add --name ssh

Ensure that the extension has been added:

~ az version
{
  "azure-cli": "2.49.0",
  "azure-cli-core": "2.49.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {
    "ssh": "1.1.6"
  }
}

Change boot mode in Linux

There are 6 boot modes.

0 –  Halt (Shutdown)
1 – Single user mode
2 – Not yet implemented
3 – Full multi-user command line mode
4 – Not used.
5 – Full multi-user Graphical User Interface mode
6 – Reboot

Default mode is written into /etc/inittab file.

By changing the following line in that file,  the default boot mode will be changed:

id:5:initdefault:

If it is production server and you don’t need to use GUI interface you can set default boot mode to 3. This is beneficial, because  the mode 3 takes less memory(RAM)  than the mode 5.

id:3:initdefault:

Note: Be careful while changing the default mode, because the following values like 0(shutdown) or 6(reboot) will cause problems. Never try to set these values, I mean 0 or 6.