Creating a Virtual Machine Scale Set
Tags: azure, virtualmachine, cloudcomputing, cloudskills
Published: 2024-06-28 09:37:12

Azure Virtual Machine Scale Sets allow you to deploy and manage a group of auto-scaling virtual machines.
the Benefit of virtual machine scale set include

**1. Easy Management:** Maintain consistent configurations across multiple VMs. All VM instances are created from the same base OS image and configuration. No extra configuration tasks or network management needed.

**2. Automatic Scaling:** Scale the number of VMs manually or define rules for autoscaling based on resource usage (CPU, memory, or network traffic). An Azure load balancer distributes traffic to VM instances in the scale set.

**3. High Availability:**  Distribute VMs across availability zones or fault domains. Maintain fault domain isolation for quorum-based or stateful workloads.

**4. Large-Scale Support:** Flexible orchestration for up to 1000 VMs.
Mix virtual machine types or use Spot and on-demand VMs together.


_To create a Virtual Machine Scale Set in Azure, follow these steps_


1. Log in to Azure: Sign in to the [Azure portal](https://portal.azure.com/)

2. Search for “Scale set” in the portal and click create virtual machine scale set.

![Create 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0mqugxr9f1yzz0ee8jn1.jpg)


![Create 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i52ud2w1jg8kgshge4mu.jpg)

3. Choose an existing resource group or create a new one
4. Set a name for your scale set (e.g., VM-SS), Select a region close to your area, set availability zone to "None" and Ensure the “Uniform” option is selected for Orchestration mode.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4odrb7cwsszkobfs5x4z.jpg)
Choose a marketplace image (e.g., RHEL, CentOS, Ubuntu, or SLES).

5. Scaling we have two types of scaling Manual and automatic but for this session we will go with automatic scaling.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f3u3r3wetp13yyuxhst.jpg)


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


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


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


6. Instance details and Administrator account details.

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

7.Networking: we will need to modify the network interface, like allowing selected ports, selecting the ports, enabling public Ip address 

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

8. Load balancer we can select an existing load balancer or create a new one, we will select azure load balancer then only give it a name and leave every other things as default


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

**Deployment**

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