DEV Community

Ezekiel Umesi
Ezekiel Umesi

Posted on • Edited on

How to Set Up Azure Virtual Machines in Multiple Availability Zones (Manual Failover Scenario)

When running critical applications in the cloud, availability matters. Azure provides Availability Zones (AZs) to help protect your apps from data center failures. In this guide, I’ll walk you through setting up Virtual Machines (VMs) in different zones — allowing for manual failover if one zone goes down.

This setup is great for learning how high availability and disaster recovery work at the infrastructure level.


🌍 What Are Availability Zones?

Availability Zones are physically separate locations within an Azure region. Each zone has its own:

  • Power
  • Cooling
  • Networking

Deploying VMs across zones ensures that even if one zone goes down, your app can recover from another — though in manual failover, you must redirect traffic or services yourself.


🧰 What You'll Do in This Guide

  • Deploy 2 Virtual Machines across different AZs using VMSS
  • Test the setup

🖥 Step 1: Create Virtual Machines in Different AZs

VM 1 (Primary)

  1. Go to Virtual Machines+ CreateVirtual Machine Scale Set
  2. Name: win11vm-1
  3. Region: Same as your VNet
  4. Availability Zone: Zone 1
  5. Choose image (e.g., Win11)
  6. Size: Standard B2s (for demo purposes)
  7. Add to the failover-vnet network
  8. Allow RDP/SSH depending on OS
  9. Click Review + Create

This Virtual Machine Scale Set gives you one VM in Zone 1 and another in Zone 2.

Image description


🧪 Step 3: Test Both VMs

Image description

Virtual Machine 1

Image description

Image description

Virtual Machine 2

Image description

Image description


✅ Summary

Feature Description
Region East US (or any region with AZs)
Manual Failover No Load Balancer present

📝 Final Thoughts

Using Azure Availability Zones gives your infrastructure resilience against unexpected failures. In this lab-style setup, we used manual failover — a realistic way to understand what happens when one part of your system becomes unavailable.

Top comments (0)