How to create a Virtual Machine scale set on Azure

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.

azure-portal

Use your credentials to log in to the account.

login-page

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.

main-dashboard

Create a Scale Set

Click on "All Services" in the left panel.

all-services

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

compute-service

Click on "Add" to create a Scale Set.

scale-set-dashboard

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".

basic-configuration-page

Proceed with the default configuration on this page.

disk-configuration-page

In the "Networking" tab, proceed with the default configuration.

networking-configuration-page

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

scaling-configuration-page

Proceed with the default configuration here.

management-configuration-page

Keep the default setting on the "Health" and "Advanced" tab.

health-configuration-page

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

add-tags

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

review-configuration-with-error

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

fix-error-on-management-page

Now, click on "Review+create".

review-create-page

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.

deployment-completed

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.

resource-group

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.

scale-set

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

virtual-machines-in-scale-set

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.

Share this page:

Suggested articles

0 Comment(s)

Add comment