Create An Azure Virtual Machine Scale Set(VMSS) From A Custom Image.

Published: (January 1, 2026 at 09:52 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

What is a Virtual Machine Scale Set (VMSS)?

An Azure Virtual Machine Scale Set allows you to create and manage a group of load‑balanced VMs. The number of VM instances can automatically increase or decrease in response to demand or a defined schedule.

Skills Needed

  • Ability to create a Virtual Machine in Azure

1. Create a Virtual Machine

  1. In the Azure portal, search for Virtual Machine and select + Create.
  2. Basics tab
    • Create a new Resource Group.
    • Provide a VM name and choose a Region.
    • Select an Availability Zone (if desired).
    • Choose a Security type.
    • Pick an Image.
    • Create an Admin account for the VM.
    • Select the appropriate Inbound ports and confirm the image eligibility.
  3. Monitoring blade – disable Boot Diagnostics (this prevents the cloud host from monitoring your activities).
  4. Review the configuration and click Create.
  5. After deployment, navigate to Resources.

2. Add and Format Disk in the Virtual Machine

  1. In the VM’s Overview, go to Settings → Disks.
  2. Click + Add data disk, name the disk, choose the size, and click Apply.
  3. Connect to the VM via RDP: download the RDP file and log in.
  4. Inside the VM, open Disk Management (search for it).
  5. Right‑click the unallocated disk, select New Volume, and follow the wizard to format the disk.

The disk is now formatted and ready for use.

  1. In the Azure portal, search for Azure Compute Galleries.
  2. Click + Create.
  3. Use the same Resource Group as the VM, give the gallery a name, and complete the creation steps.

4. Capture the Virtual Machine Image

  1. In the VM’s Overview, click Capture and select Image.

  2. Basics tab – ensure the Subscription, Resource Group, and Region match the original VM.

  3. Enable Image Share to Azure Compute Gallery and select the gallery created in the previous step.

  4. Choose the Operating System state:

    • Generalized – the image requires hostname, admin user, etc., to be set on first boot.
    • Specialized – the image is fully configured and does not require those parameters.
  5. Provide a Target name, Version number, and Replication count, then review and click Create.

Note: Creating the captured image will automatically shut down the source VM.

5. Create a Virtual Machine Scale Set (VMSS)

  1. After the captured image is ready, go to Resources and select + Create VMSS.

  2. Use the default Subscription, Resource Group, and Region, then give the VMSS a name.

  3. Choose an Orchestration mode:

    • Flexible – provides high availability with identical VM specifications.
    • Uniform – suited for large‑scale, stateless workloads that may have varying specifications.
  4. Set Scaling mode to No scaling (as this article demonstrates a static set).

  5. Review the configuration and click Create.

The VMSS is now created and highly available.

Back to Blog

Related posts

Read more »