An Azure Scale Set helps to create and manage a group of identical, load-balanced Virtual Machines. The number of Virtual Machines belonging to the scale set can grow and shrink automatically based on the load. This helps to have high availability for our applications deployed in Virtual Machines.

Scale set improves the performance of the applications, it distributes the applications all over multiple instances. These Virtual Machines can be accessed through the Load Balancer.

Using Scale Set, we can easily create and manage multiple VMs. It provides high availability of the applications.

To know more about Scale Set, click here

In this article, we will see the steps to create a simple Scale Set having a minimum of 2 Virtual Machines in it.

Pre-requisites

  1. Azure Account (Create if you don’t have one).

What will we do?

  1. Login to Azure.
  2. Create a Scale Set

Login to Azure

Click here to go Azure portal and click on Portal.

<img alt="azure-portal" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_11909_pm.png61d6bbad7acf8.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Use your credentials to log in to the account.

<img alt="login-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_11913_pm.png61d6bbadafde6.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

You will see the main page as follows once you successfully login to your account. Click on 3 lines near “Microsoft Azure” in the upper left-hand corner of the Azure portal to show the portal menu.

<img alt="main-dashboard" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_11953_pm.png61d6bbade4c3b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Create a Scale Set

Click on “All Services” in the left panel.

<img alt="all-services" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_11958_pm.png61d6bbae331fc.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on Virtual Machine Scale Set to go to its dashboard under Compute.

<img alt="compute-service" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12054_pm.png61d6bbae5dfbb.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on “Add” to create a Scale Set.

<img alt="scale-set-dashboard" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12059_pm.png61d6bbae9fbe4.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="256" loading="lazy" src="data:image/svg xml,” width=”750″>

In the Basics tab, select the correct subscription and then choose to create a new resource group. Type “test-rg” for the name and then select OK.

Select a region of your choice, provide a system login user name and password. 

Click on “Next: Disks”.

<img alt="basic-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12221_pm.png61d6bbaeca01e.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Proceed with the default configuration on this page.

<img alt="disk-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12235_pm.png61d6bbaf3696c.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="261" loading="lazy" src="data:image/svg xml,” width=”750″>

In the “Networking” tab, proceed with the default configuration.

<img alt="networking-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12306_pm.png61d6bbaf6f5dd.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="301" loading="lazy" src="data:image/svg xml,” width=”750″>

In the “Scaling” tab, select  “” as “custom” and specify 2 as ““. Click on “Next: Management”.

<img alt="scaling-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12333_pm.png61d6bbafb0b39.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Proceed with the default configuration here.

<img alt="management-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12346_pm.png61d6bbafee6e0.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="314" loading="lazy" src="data:image/svg xml,” width=”750″>

Keep the default setting on the “Health” and “Advanced” tab.

<img alt="health-configuration-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12351_pm.png61d6bbb0358cf.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="174" loading="lazy" src="data:image/svg xml,” width=”750″>

Add a tag as “environment:test”, you can add more tags if you want and then click on “Review create”.

<img alt="add-tags" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12424_pm.png61d6bbb076ca2.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="204" loading="lazy" src="data:image/svg xml,” width=”750″>

If you see any error, go to the respective tab to fix the error. 

<img alt="review-configuration-with-error" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12432_pm.png61d6bbb0b7d62.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="126" loading="lazy" src="data:image/svg xml,” width=”750″>

Here, to fix this specific issue, select “off” for “Boot diagnostic”

<img alt="fix-error-on-management-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12446_pm.png61d6bbb107dc7.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="298" loading="lazy" src="data:image/svg xml,” width=”750″>

Now, click on “Review create”.

<img alt="review-create-page" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12500_pm.png61d6bbb13d388.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Within a few minutes, you will see a message as “Your deployment is complete”. Click on Resurce group “test-rg” to go to the Resource Group Dashboard.

<img alt="deployment-completed" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12742_pm.png61d6bbb17e435.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="246" loading="lazy" src="data:image/svg xml,” width=”750″>

Here, you will see that a few other objects have also been created upon creating a Scale Set.

Click on the Scale Set object to go to its dashboard.

<img alt="resource-group" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12902_pm.png61d6bbb1b3bbc.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="224" loading="lazy" src="data:image/svg xml,” width=”750″>

Here, you will see an overview of the Scale Set we just created.

Click on “Instances” in the left panel to see the Virtual Machines which belong to the Scale Set.

<img alt="scale-set" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12931_pm.png61d6bbb204377.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="468" loading="lazy" src="data:image/svg xml,” width=”750″>

Here, you can see that there are 2 Virtual Machines as we had specified 2 minimum number of instances in the scaling policy.

<img alt="virtual-machines-in-scale-set" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/01/echo/screenshot_2020-06-21_at_12937_pm.png61d6bbb229793.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="173" loading="lazy" src="data:image/svg xml,” width=”750″>

Conclusion

In this article, we saw the steps to create a Scale Set for Virtual Machines. We specified 2 as a minimum number of instances in the Scale Set which can increase up to 10 if the load on the servers increases.