Azure Virtual Machine Scale Sets (VMSS) help you deploy and manage identical VMs that auto-scale based on demand. In this guide, we’ll:

Create a VM Scale Set in Azure

Connect via SSH

Install and Test Nginx (a lightweight web server)

Perfect for beginners! Let’s get started.


Step 1: Create a VM Scale Set in Azure

1. Log in to Azure Portal : Go to portal.azure.com and sign in.

2. Create a VM Scale Set

  • Click "Create a resource" > Search for "Virtual Machine Scale Set" > Create.

Image description

  • Fill in the details:
    • Resource Group: Create new (e.g., my-vmss-rg).
    • Name: Add a name.(e.g,my-vmss)
    • Region:Select a Region that is close to your area (East US).

Image description

  • Image: Ubuntu Server 22.04 LTS
  • Size: Standard_B1s (cheap for testing)

Image description

  • Orchestration mode: Select Uniform.
  • Security type: Select Standard.
  • Scaling mode: Choose the Autoscaling option.

Image description

3. Configure Scaling.

Image description

  • Instance count: Start with 2 VMs.

Image description

Image description

  • Scaling policy: Manual (or set auto-scaling rules later).

4. Add SSH Authentication

  • Authentication type: SSH public key.
  • Username: azureuser
  • SSH public key: Paste your key (or generate one).
  • Enter the Key pair name.

Image description

5. Network Configuration

Image description

  • Set the load balancer,choose a type.

Image description

Image description

  • Create a Network Interface.

Image description

  • Allow inbound SSH (port 22) and HTTP (port 80).

Image description

6. Review & Deploy

  • Click Review + Create > Create.

Image description

  • Select the Download private key and create Resource.

Image description

  • After the deployment is completed, click on the Go to resource.

Image description

Step 2: Connect via SSH & Install Nginx

1. Find the Public IP

  • Go to your VMSS > Networking > Check the Load Balancer’s Public IP.

Image description

2. SSH into a VM Instance

Open Terminal (Linux/macOS) or PowerShell (Windows) and run:

ssh -i ~/.ssh/your_private_key azureuser@

(Replace your_private_key and with your details.)

Image description

3. Install Nginx

Once logged in, run:

sudo apt update && sudo apt install nginx -y

4. Verify Nginx is Running

sudo systemctl status nginx

(You should see active (running).)

5. Test in Browser

  • Open a browser and enter the Public IP of your VMSS.
  • You should see the Nginx welcome page! 🎉

Image description

Conclusion

You’ve successfully:

✔ Created a VM Scale Set in Azure

✔ Connected via SSH

✔ Installed Nginx

🚀 Need help? Drop a comment below!