Deploy VMs to availability zones and sets

Create and configure virtual machines (VMs)

📘Microsoft Certified: Azure Administrator Associate (AZ-104)


Availability in Azure means making sure your virtual machines (VMs) stay online even if hardware, power, or networking problems happen inside an Azure datacenter. As an Azure Administrator, you must know how to deploy VMs in ways that increase uptime, protect against failures, and meet service-level agreements (SLAs).

Azure provides two key options for VM high availability:

  1. Availability Zones (AZs)
  2. Availability Sets

Both help protect your applications, but they work differently and protect against different failure types.
The AZ-104 exam expects you to clearly understand how they work, when to use them, and how to deploy VMs into them.


1. Availability Zones

What Are Availability Zones?

Availability Zones are physically separate locations within the same Azure region.
Each zone has its own power, cooling, and networking, meaning a failure in one zone does not affect another.

Most regions have 3 zones, labeled:

  • Zone 1
  • Zone 2
  • Zone 3

When you deploy VMs across these zones, Azure protects your applications from large-scale datacenter failures.

Why Use Availability Zones?

  • Protection from datacenter-level outages
  • Higher SLA: 99.99% VM uptime (when using zone-redundant deployments)
  • Best choice for mission-critical workloads (e.g., database clusters, application servers, domain controllers)

How VMs Deploy to Availability Zones

When creating a VM, you select a zone:

  • Zone 1
  • Zone 2
  • Zone 3

Every VM placed in a different zone runs on completely independent infrastructure.

IT Example

If you run a production database cluster, you can deploy:

  • DB-VM1 → Zone 1
  • DB-VM2 → Zone 2
  • DB-VM3 → Zone 3

If Zone 1 fails, the database cluster still works through VMs in Zones 2 and 3.

Important Concepts for AZ-104 Exam

✔ Availability Zones = physical separation
✔ Used for high-level protection
✔ Zone-resilient storage and networking may be required
✔ You choose the zone only during VM creation
✔ You cannot move a VM between zones after deployment
✔ VMs in different zones may require a load balancer (Standard SKU only)

How to Deploy a VM to a Zone

Portal → Create VM → Availability options → Availability zone → Select zone
CLI Example:

az vm create \
  --resource-group RG1 \
  --name VM1 \
  --image UbuntuLTS \
  --zone 1

2. Availability Sets

What Is an Availability Set?

An Availability Set is a logical grouping inside one Azure datacenter that ensures VMs are distributed across multiple fault domains and update domains.

It protects against:

  • Hardware failures
  • Planned maintenance (host OS updates)

Fault Domains (FDs)

A Fault Domain is a group of physical hardware (servers, storage, network).
If a rack or power unit fails, all VMs in that FD fail.

Availability Sets spread VMs across multiple fault domains (usually 2–3).

Update Domains (UDs)

Azure performs maintenance by updating servers domain by domain.
Azure guarantees that only one update domain restarts at a time.

Availability Sets spread VMs across multiple update domains to avoid planned maintenance downtime.

Exam Example

If you deploy 3 VMs in an availability set with 2 fault domains and 5 update domains:

  • Azure distributes them so no two VMs are on the same hardware at the same time.
  • Azure never reboots all VMs together.

Why Use Availability Sets?

  • Protect against rack hardware failures
  • Protect against Azure host maintenance
  • SLA improves to 99.95% VM uptime

Important Rules for the Exam

✔ All VMs in an availability set must be created inside the set
✔ You cannot add existing VMs to an availability set
✔ Availability sets only apply within a single datacenter
✔ You can use Azure Load Balancer for distributing traffic
✔ Managed disks must be used (Classic storage not supported for newer features)

IT Example

In a typical web application:

  • Web-VM1 → FD1, UD1
  • Web-VM2 → FD2, UD2

If a hardware rack fails (FD1), Web-VM2 stays online.
If Azure performs maintenance on UD1, Web-VM2 is not restarted.

How to Deploy a VM into an Availability Set

Portal → Create VM → Availability options → Availability set → Select or create

CLI Example:

az vm availability-set create \
  --name MyAS \
  --resource-group RG1

az vm create \
  --resource-group RG1 \
  --name VM1 \
  --availability-set MyAS \
  --image UbuntuLTS

3. Availability Zones vs Availability Sets

FeatureAvailability ZonesAvailability Sets
Protection LevelDatacenter-level failuresRack/hardware failures
SLA99.99%99.95%
TypePhysical separationLogical grouping
VM MigrationCannot move VM between zonesCannot move VM into a set
Load BalancerStandard LB requiredStandard or Basic LB
Use CaseMission-critical applicationsStandard HA within one datacenter

4. When to Use Which? (Exam Guidance)

ScenarioBest Choice
You need highest availabilityAvailability Zones
Protect from full datacenter failureAvailability Zones
Running production database clustersAvailability Zones
Protect against hardware/rack failureAvailability Sets
Legacy apps or systems not zone-readyAvailability Sets
Apps needing high availability but not cross-zoneAvailability Sets

5. Load Balancers and High Availability

If VMs are in Availability Zones:

  • You must use a Standard Load Balancer
  • It supports zone-redundant and zone-specific frontend IPs

If VMs are in an Availability Set:

  • You can use Basic or Standard Load Balancer
  • Distribution happens only inside the same datacenter

6. Disk Placement in High Availability

For availability sets:

  • Managed disks are spread across multiple storage fault domains

For availability zones:

  • Disks are automatically created in the same zone as the VM
  • You must use zone-redundant storage (ZRS) if you want multi-zone redundancy

7. Key Exam Tips (Memorize These!)

Availability Zones

  • Highest availability option
  • Protect against datacenter failure
  • Must select zone during VM creation
  • Cannot change zone later

Availability Sets

  • Protect against hardware failures
  • Must create VMs inside the set
  • Cannot add an existing VM to a set
  • Distributed across fault and update domains

SLA Memory Trick

  • Zones = 99.99%
  • Sets = 99.95%

Conclusion

Deploying VMs to Availability Zones and Availability Sets is a core AZ-104 skill that ensures your workloads stay available, resilient, and prepared for failures.

As an Azure Administrator, your job is to understand:

  • What each option protects against
  • How to deploy VMs into these options
  • When to choose zones vs sets
  • Required networking and load balancing settings
  • Exam rules regarding migration, limitations, and SLAs

Mastering this topic will help you confidently answer exam questions about VM high availability and infrastructure resilience.

Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee