AZ-104 Explained

Configure VM Availability in Azure: AZ-104 Lesson

AZ-104 lesson on Azure VM availability: availability sets, update and fault domains, availability zones, scale sets and autoscale, with real scenarios.

· 6 min read

Thumbnail of the lesson: Configure virtual machine availability
Watch the lesson: Configure virtual machine availability | Deploy and manage Azure… | AZ-104 Azure Administrator

Configure virtual machine availability is the AZ-104 lesson that teaches you how to keep Azure virtual machines running through maintenance and outages. It is for Azure administrator learners who can already create a basic VM and now need to design for high availability with availability sets, availability zones, and scale sets with autoscale.

The lesson starts from a simple problem: a single VM is a single point of failure. In about 34 minutes it gives you the tools to design a topology that survives planned maintenance and unexpected outages. It is part of the free AZ-104 Azure Administrator course.

What this lesson covers

The lesson works through eight topics in order:

  • Preparing for failures. The three scenarios an administrator must plan for: unplanned hardware maintenance, unexpected downtime and planned maintenance. A key point from the video: Microsoft patches the underlying host, but it does not patch your VM’s operating system. That stays your responsibility.
  • Availability sets. A logical grouping that tells Azure to spread related VMs across separate physical servers, racks and network switches, so one rack failure cannot take down the whole application.
  • Update domains and fault domains. How every VM in an availability set gets one of each. During planned maintenance Azure reboots one update domain at a time. The video explains that you can choose between 1 and 20 update domains, with a default of five. A fault domain is a physical rack that shares power and a network switch.
  • Availability zones. Physically separate locations within a region, each with independent power, cooling and networking.
  • Vertical scaling. Scaling a VM up or down. The video points out that it depends on available larger hardware and often needs the VM to stop and restart.
  • Virtual machine scale sets. Groups of identical VMs that can work with Azure Load Balancer or Application Gateway.
  • Autoscale. Rules that add or remove instances based on demand, with a minimum, maximum and default instance count.
  • Configuring autoscale, walked through step by step.

Two exam-relevant rules from the video are worth writing down. First, a VM can only be added to an availability set when it is created; to move it to a different set you must delete and recreate it. Second, an availability set protects against infrastructure failures, not application bugs, so you still need a separate disaster recovery plan.

Key points from the lesson

  • By the end of this lesson, you will be able to configure Azure virtual machines for high availability using availability sets, availability zones, and scale sets with autoscale. (0:00)
  • Let’s break down the three main scenarios you need to plan for. First, unplanned hardware maintenance happens when Azure predicts a physical component is about to fail. It uses lib migration to move your VM to healthy hardware … (3:51)
  • To achieve redundancy, they place two virtual machines running the web server into an availability set called web tier. (9:01)
  • You could have a web availability set with one VM in each fault domain and a separate SQL availability set also with one VM in each fault domain. This way, the loss of an entire rack doesn’t take down your whole web tier or your whole … (12:41)
  • Each availability zone is a unique physical location made of one or more data centers with independent power, cooling, and networking. (16:46)
  • Scale sets support Azure load balancer for basic layer 4 traffic distribution and application gateway for advanced layer 7 traffic and TLS termination. (20:07)
  • For optimal performance and cost control, the best practice is to define a minimum, maximum, and default number of virtual machine instances. (23:38)
  • The team decides to implement Azure virtual machine scale sets to manage their virtual machines and allow for autoscaling based on demand. They create availability sets to group their virtual machines, ensuring that they are … (27:47)

Where it fits in the AZ-104 course

This is video 23 of 30 in the course, in the compute section. It comes straight after Introduction to Azure virtual machines, where you plan and create a single VM using the portal and the Azure CLI. It is followed by Configure Azure App Service plans, which moves from VMs to Azure’s platform for web apps.

The design examples use Azure Load Balancer and Application Gateway, so revisit those networking lessons if the terms are new.

How to study this lesson

  1. Watch the opening scenario of the retail site handling a flash sale. The video uses it to show autoscale growing a scale set from two VMs to four when CPU passes a 75% threshold, then scaling back in afterwards.
  2. Draw the two-tier design from the video: a load balancer, a web tier availability set and a separate database availability set, all on managed disks. Mark which VMs sit in which fault domain and update domain.
  3. Walk through a maintenance event on paper. Using the video’s update domain example, write down which VMs go offline at each step and confirm the application stays reachable.
  4. Compare availability sets and availability zones: rack-level versus data centre-level isolation.
  5. Note the scale set settings: the minimum, maximum and default instance counts, and the scale-out and scale-in rules.
  6. Test yourself. Configure virtual machine availability is one of the topics in the AZ-104 mock exam, which has a free 10-question sample.

Frequently asked questions

What is the difference between an update domain and a fault domain?

In the lesson, an update domain is a group of VMs and hardware that can be rebooted at the same time during planned maintenance, and Azure reboots one update domain at a time. A fault domain is a physical rack that shares a power source and network switch, so spreading VMs across fault domains protects you from a rack-level outage.

Can I add an existing VM to an availability set?

No. The video stresses that a VM can only be placed in an availability set when it is created. To change its availability set later, you have to delete and recreate the VM.

When should I use a scale set with autoscale?

Use it when demand changes and you want Azure to add or remove identical VMs for you, as in the lesson’s flash sale example.

Is this lesson free?

Yes. The lesson and the rest of the AZ-104 course are free on YouTube. Follow the full course in order from the AZ-104 course page.

Do it yourself

Lab guides, practice and full mock exams come with a subscription. See the plans