Adding Our Existing Azure Virtual Machine To High Availability Set

Introduction

 
In our previous article, we have learned Configuring Virtual Machines Scale Sets in Azure. You can read that article from this link here. In this article, we will learn how to add our existing Azure Virtual Machine to High Availability Set.
 
Step 1
 
We have already created an Availability Set named “iisweb” under the “Blog” Resource Group. There are no Virtual Machines under the iisweb Availability Set.
  • Set Resource Group: Blog
  • Availability Set: iisweb
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 2
 
We have already created two virtual machines running under the Blog Resource group; those are -
  • Virtual Machine 1: Web1
  • Virtual Machine 2: Web2
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 3
 
Download the PowerShell script named “Set-ARmVmAvailabilitySet.ps1” to your local machine. Open the PowerShell and run the script.
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 4
 
Enter the VmName, AvalabilitySetName, and ResourceGroup Name and hit Enter. In this demo, our instance names are;
  • VmName: Web1
  • AvalabilitySetName: iisweb
  • ResourceGroup: Blog
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 5
 
When you hit the Enter key, the "Sign in to Microsoft Azure" prompt asks for Azure login credentials. So, enter your username and password.
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 6
 
Now, we can verify that our Virtual Machine named “Web1” has been successfully added to our “iisweb” Availability Set.
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 7
 
Again, repeat the same process to add our second virtual machine named “Web2” in the same Availability Set named “iisweb”.
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 8
 
Now, we can verify that our Virtual Machine “Web1” is running under the iisweb Availability Set, and the second Virtual machine “Web2” is being created.
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 
Step 9
 
Now, both the Virtual Machines are successfully added to our existing High Availability Set. 
 
Adding Our Existing Azure Virtual Machine To High Availability Set
 

Summary

 
In this demo, we have learned how to add our existing virtual machine to a High Availability Set in Microsoft Azure. If you have any questions, feel free to comment under the article.


Similar Articles
IFS R&D International (Private) Limited
IFS is a global enterprise software vendor providing solutions that help companies get better return