DEV Community

Cover image for Creating a Virtual Machine scale set
Afeez Adeyemo
Afeez Adeyemo

Posted on

Creating a Virtual Machine scale set

This is a tutorial that gives a step-by-step guide, with screenshots on how to create a virtual machine scale set. It is a sequel to the previous tutorials on adding hard disc to a VM and creating an image gallery.

A Virtual Machine Scale Set (VMSS) in Azure is a service that allows you to create and manage a group of identical, load-balanced VMs. The key feature of a VM scale set is its ability to automatically increase or decrease the number of VM instances in response to demand or a defined schedule12.

Here are some of the main benefits of using VM scale sets:

  • Automatic Scaling: VMSS can automatically adjust the number of VMs based on metrics like CPU usage, memory usage, or network traffic.
  • High Availability: By distributing VMs across availability zones or fault domains, VMSS ensures high availability and resilience.
  • Consistent Configuration: All VM instances in a scale set are created from the same base OS image and configuration, ensuring consistency across your environment.
  • Load Balancing: VMSS integrates with Azure Load Balancer and Azure Application Gateway to distribute traffic efficiently.

Fine below the steps in creating a virtual machine scale set.

  1. From the previously create and saved image. Select + create VMSS.
    + create VMSS.

  2. Enter details of the VMSS

  • Enter the resource group name that contains the previously created VM and Image gallery. Set the Virtual machine scale set name.

VMSS details

  • For the orchestration mode, there are 2 optional (Flexible and Uniform). Flexible creates a scale set of VMs with high availability i.e. a set of machines that are very dependable with no downtime. The uniform options create a set of stateless machines that doesn't store historical information.
    For the purpose of this tutorial select flexible
    orchestration mode

  • For scaling select manually update the capacity, this enables you to manually scale. Autoscaling can be used if conditions of overloading can be predetermined and configured into the Autoscaling criteria.

  • Select license type

    • Review and create

licensing
scaling

  • Wait for the VMSS to deploy

4 - Go the VMSS just created. In the Availability + scale blade, select Scaling. Notice manual scale is pre-selected

Image description.

  • The instance count defines the number of VMs to be created automatically in the VMSS. For this tutorial set it at 50 and save and wait for saving to be complete.

Image description

  • Navigate back to virtual machines from the home page. Observe that Azure is automatically creating 50 VMs in the scale set.

VMSS deployed.

This VMSS comprising of 50 VMs are now available to support increased workload thereby ensuring high availability and performance.

Kindly drop questions and comments in the comment section

Top comments (0)