Azure VM Availability and Scaling: Availability Zones, Availability Sets, VM Scale Sets, Autoscale and Images

Microsoft Certified Azure Administrator Associate AZ 103 60 min min read Updated: Nov 17, 2026 Intermediate
Azure VM Availability and Scaling: Availability Zones, Availability Sets, VM Scale Sets, Autoscale and Images
Intermediate Topic 2 of 3

Availability Options

OptionProtects fromNotes
Single VM (premium disks)Some hardware faultsLowest SLA
Availability setRack failure and planned maintenance in one datacenterUses fault domains and update domains
Availability zonesDatacenter failureVMs in zones 1, 2, 3. Higher SLA. Preferred where available
Scale set across zonesDatacenter failure plus loadBest for identical stateless VMs
  • Fault domain: group sharing power and network. Update domain: group rebooted together during maintenance
  • A VM is either in an availability set or a zone design. Choose at creation time
bash az vm availability-set create -g rg-vm -n avset-web --platform-fault-domain-count 2 --platform-update-domain-count 5 az vm create -g rg-vm -n web02 --availability-set avset-web --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

VM Scale Sets (VMSS)

  • A group of identical VMs managed together with a load balancer
  • Flexible orchestration is the recommended mode for new deployments
  • Supports autoscale, zones, rolling upgrades and Spot instances
bash az vmss create -g rg-vm -n vmss-web --image Ubuntu2204 --vm-sku Standard_B2s --instance-count 2 \ --zones 1 2 3 --admin-username azureuser --generate-ssh-keys --upgrade-policy-mode Automatic --lb lb-web az vmss list-instances -g rg-vm -n vmss-web -o table az vmss scale -g rg-vm -n vmss-web --new-capacity 4

Autoscale

TypeExample
Metric-basedAdd 2 instances when average CPU is above 70% for 10 minutes
Schedule-basedRun 6 instances on weekdays 9 to 18
PredictiveScale ahead based on a pattern (check availability)
bash az monitor autoscale create -g rg-vm --resource vmss-web --resource-type Microsoft.Compute/virtualMachineScaleSets \ --name auto-web --min-count 2 --max-count 10 --count 2 az monitor autoscale rule create -g rg-vm --autoscale-name auto-web --condition "Percentage CPU > 70 avg 10m" --scale out 2 az monitor autoscale rule create -g rg-vm --autoscale-name auto-web --condition "Percentage CPU < 30 avg 10m" --scale in 1
Scale-in rule Always add a scale-in rule and keep a gap between thresholds (for example 70 and 30) to avoid flapping.

Images

  • Marketplace images are ready-made
  • A custom image captures a configured VM (generalize it first: sudo waagent -deprovision+user on Linux, Sysprep on Windows)
  • Store versioned images in Azure Compute Gallery and replicate them to other regions
  • Azure Image Builder automates image creation in a pipeline
bash az vm deallocate -g rg-vm -n web01 az vm generalize -g rg-vm -n web01 az image create -g rg-vm -n web-image --source web01

Practice

  1. Create a scale set across three zones
  2. Add autoscale rules and test with CPU load
  3. Create a custom image from a configured VM
  4. Explain fault domain versus update domain

Conclusion

Use zones or availability sets for resilience and scale sets with autoscale for elastic capacity. Build custom images in a gallery so every VM starts identical.

Quick Summary: availability options; VMSS; autoscale; images.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators