Creating and deploying highly available VMs with Azure PowerShell

  1. Home
  2. Creating and deploying highly available VMs with Azure PowerShell

Return to AZ-104 Tutorial

Here, you will get acquainted with Azure PowerShell and the process to increase the availability and reliability of Virtual Machines with the help of and Availability Sets. 

Availability Sets enables the VMs to deploy on Azure are classified across various, isolated hardware nodes, in a batch.

So here you learn  and understand the procedure to create the following:

  • Firstly, creating an availability set
  • Secondly, creating a VM in an availability set
  • Thirdly, checking available VM sizes
  • Lastly, checking Azure Advisor
Overview of an Availability set 

An Availability Set is a legitimate grouping inclination for isolating VM resources from each other after deployment. Also, azure assures that the VMs you set within an Availability Set flow within the following:

  • Firstly, the multiple physical servers 
  • Secondly, compute racks 
  • Subsequently, storage units 
  • Lastly, network switches. 

In case of a hardware or software failure then, a subset of your VMs are affected. However, the overall solution remains operational. Availability Sets are necessary for building reliable cloud solutions.

Launching Azure Cloud Shell

The Azure Cloud Shell is a free interactive shell which can use to run the steps. Not to mention, it has common Azure tools preinstalled and configured to work with your account.

To begin the Cloud Shell, follow the following steps:

  • First of all, just select Try it from the upper right corner of a code block. Also, you can launch Cloud Shell in a different browser tab by visiting: https://shell.azure.com/powershell. 
  • Subsequently, select Copy to copy the blocks of code.
  • Then, paste it into the Cloud Shell, and later press enter to run it.
Practice Test for AZ-104
Creating an availability set

The hardware in a section is separated into various update domains and fault domains. 

You can create an availability set using New-AzAvailabilitySet. For instance, the number of both update and fault domains is 2 and the availability set is called myAvailabilitySet.

Creating VMs inside an availability set

VMs should be generated within the availability set to assure they’re correctly disseminated across the hardware. However, you can’t join an existing VM to an availability set after it’s creation.

The moment you generate a VM with New-AzVM, use the -AvailabilitySetName parameter to define the name of the availability set.

Checking for available VM sizes

When you create a VM in an availability set, you must know that VM sizes are available on the hardware. So, use Get-AzVMSize command to notice all available sizes for virtual machines that you can deploy in the availability set.

Checking Azure Advisor

Further, you can also use Azure Advisor to view more information on how to advance the availability of your VMs. Azure Advisor examines the configuration and usage telemetry. Thereafter, recommends solutions which can help to improve the cost-effectiveness, performance, availability, and security of your Azure resources.

Azure PowerShell

Reference: Microsoft Documentation

Return to AZ-104 Tutorial

Menu