How to create a Virtual Machine Scale Set
Published: 2024-06-28 19:38:23

Creating a Virtual Machine Scale Set (VMSS) in Azure allows you to manage and scale multiple VMs as a single unit. Here’s a step-by-step guide to create a VMSS in the Azure portal:

Step-by-Step Guide to Creating a VM Scale Set in Azure

## Sign in to Azure Portal

1 - Open a web browser and go to the Azure portal.
2 - Sign in with your Azure account credentials.

## Navigate to Virtual Machine Scale Sets

1 - In the Azure portal search bar, search for and select, "Virtual machine scale sets".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bpf7iez9yj8v8rag726k.png)

2 - Select Create on the Virtual Machine Scale Sets page.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nx6eklcvr68cp3xfvxqu.png)

## Basics Tab

1 - Subscription: Select the subscription you want to use.
2 - Resource group: Select an existing resource group or create a new one.
3 - Name: Provide a name for your scale set.
4 - Region: Choose a region where you want to deploy the scale set.
5 - Availability zone: Select the availability zone (if needed).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rkn27ng3pkpaqns21qw5.png)


6 - Orchestration mode: Select the orchestration mode (Uniform or Flexible). Uniform is more common and is used for consistent scaling.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bm8rok8bh8w3aj4r5k1t.png)


7 - Image: Click on the dropdown menu and select a base image for the VMs (e.g., Ubuntu Server, Windows Server, etc.).
8 - VM size: Click on "Change size" and select the appropriate VM size for your needs.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47cwo016yfdor3qro12z.png)


## Instances and Scaling

1 - Instance count: Set the initial number of VM instances.
2 - Scaling policy: Configure the scaling policy, whether you want manual or automatic scaling.
3 - Autoscale settings: Configure autoscale rules if you selected automatic scaling.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7w5ziyglr9tcvve3vu5.png)

## Disks Tab

1 - OS disk type: Choose the type of disk (e.g., Standard SSD, Premium SSD).
2 - Data disks: If you need additional data disks, you can add them here.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z3z4u2orbjrhy3gp7112.png)

## Networking Tab

1 - Virtual network: Select an existing virtual network or create a new one.
2 - Subnet: Select a subnet within the virtual network.
3 - Public IP: Choose whether to create a new public IP or use an existing one.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5y9tshyxcx9m07cqvvp4.png)

4 - Load balancing: Select whether to configure load balancing for your scale set instances. You can choose an Azure load balancer or an application gateway.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sftxmh7lg0rnifqjm9p8.png)

## Management Tab

Leave as  default

## Advanced Tab

Leave as default

## Tags Tab

Leave as default

## Review + Create Tab

1 - Review all the settings you have configured.
2 - Click on the "Create" button to start the deployment of the VM scale set.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/524sb5pvwzzg7cn90ivk.png)

## Post-Creation Steps

## Access Your Scale Set Instances

1 - Once the scale set is created, navigate to the "Virtual machine scale sets" section in the Azure portal.
2 - Select your scale set to manage and view the individual VM instances.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7j0z4j8uxnbupir2ybg7.png)


3 -  You can connect to the instances using SSH or RDP, depending on the OS and configuration.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1hxshr4d0l0nrnjpiav.png)



## View the web server in action

Use a web browser of your choice to view the default NGINX welcome page. Type the public IP address of the VM as the web address. The public IP address can be found on the VM overview page or as part of the SSH connection string you used earlier.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v34tq1p0vto778e2p4sx.png)