To implement AZs, follow these steps:
- Select an AZ during VM creation, as shown in the following screenshot:
Figure 9.21 – Configuring availability for a VM
Note that you will have to select a proper region (if a region of your choice does not support AZs, the Availability zone option will be grayed out).
- Once the proper option is selected, you will see a new dropdown where you can select the ID of a zone. In most cases, you will have to select one of three different options. At some point in the future, there may be regions that offer more than three zones.
The same can be achieved using the Azure CLI – we can use the az vm create command with the --zone switch to denote the zone in which a machine will be created:
$ az vm create -n <vm-name> -g <rg-name> --location <location> --zone <1,2,3>
The preceding scenario works for a single VM. Note that a single machine will not give you any guarantees...