How to Create and deploy highly available virtual machines?

  1. Home
  2. How to Create and deploy highly available virtual machines?

In this tutorial, you’ll learn how to use Availability Sets to improve the availability and dependability of your Virtual Machines (VMs). The VMs you install on Azure are deployed across numerous, separated hardware nodes in a cluster using Availability Sets.

Availability Set – An Overview

  • When VM resources are deployed, an Availability Set is a logical grouping capability for isolating them from each other.
  • Azure ensures that VMs in an Availability Set is distributed over numerous physical servers, compute racks, storage units, and network switches.
  • Only a fraction of your VMs are affected by a hardware or software failure, and your entire solution remains functioning. Building dependable cloud solutions necessitate the use of Availability Sets.

Launching Azure Cloud Shell

You may perform the instructions in this tutorial using the Azure Cloud Shell, which is a free interactive shell. It comes with pre-installed and configured Azure tools for usage with your account.

  • To begin, select Try it from the upper right corner of a code block to launch the Cloud Shell.
  • By navigating to https://shell.azure.com/powershell, you may easily run Cloud Shell in a new browser tab.
  • After that, select Copy to copy the code blocks, paste them into the Cloud Shell, then hit Enter to launch them

Creating an availability set

A location’s hardware is split into several update domains and fault domains. An update domain is a collection of virtual machines (VMs) and real hardware that may all be restarted at the same time. In addition, VMs in the same fault domain share common storage, power, and a network switch.

New-AzAvailabilitySet can be used to build an availability set. The number of update and fault domains in this example is two, and the availability set is called myAvailabilitySet.

Creating VMs inside an availability set

To ensure that VMs are distributed evenly throughout the hardware, they must be generated inside the availability set. After you’ve created an availability set, you can’t add an existing VM to it.

When you create a VM with New-AzVM, you use the -AvailabilitySetName parameter to specify the name of the availability set.

  • To begin, use Get-Credential to create an administrator login and password for the VM.
  • Then, create two VMs in the availability set using New-AzVM.
  • In addition, creating and configuring both VMs takes only a few minutes. When you’re done, you’ll have two virtual computers spread over the hardware.
  • Following that, you should be able to view how the VMs are split over the two fault and update domains by heading to Resource Groups > myResourceGroupAvailability > myAvailabilitySet on the portal.
How to Create and deploy highly available virtual machines?
Image Source – Microsoft

Checking for available VM sizes

You need to know what VM sizes are available on the hardware before you can construct a VM inside an availability set. Use the Retrieve-AzVMSize command to get a list of all available sizes for virtual machines in the availability set.

Checking Azure Advisor

You may also use Azure Advisor to learn more about how to make your VMs more available. Following that, Azure Advisor examines your setup and use data before recommending solutions to help you enhance the cost-effectiveness, performance, availability, and security of your Azure resources.

free practice test for AZ- 303

Go back to home page

Reference documentation – Tutorial: Create and deploy highly available virtual machines with Azure PowerShell

Menu