In the last blog, we captured a custom Windows VM image using Azure Compute Gallery. Now, we're going to use that image to create a Virtual Machine Scale Set (VMSS). This allows you to automatically scale up or down based on demand. Let's dive in.
🧭 Step 1: Go to Azure Compute Gallery
- From the Azure Portal home, search for "Azure Compute Gallery".
- Open the gallery you created earlier.
📸 Step 2: Select Your Image
- Click on the image you previously captured.
- It should have the type marked as Specialized (remember, we chose specialized because we didn't generalize our VM).
A specialized image retains all the settings and configurations exactly as they were on your VM. This is useful for cloned environments or when you're not using Sysprep.
🛠️ Step 3: Create a VMSS
- In the image's overview page, click "Create VMSS".
- Provide a Scale Set Name.
- Choose your Region.
- Under Orchestration Mode, select Flexible.
💡 Why Flexible Orchestration Mode?
Flexible mode gives you more control over scaling and VM instances. It's ideal for mixed workloads or when VM identity and persistence matter.
⚙️ Step 4: Configure Scaling Options
- Under the Scaling tab, enable automatic scaling.
- Add a new scaling condition:
-
Condition Name: e.g.,
scale-on-demand
-
Instance Count: e.g.,
2
-
Minimum:
1
-
Maximum:
5
-
Scale Out: Increase count by
1
-
Scale In: Decrease count by
1
-
Condition Name: e.g.,
- Click Save.
🔐 Step 5: Admin Credentials (Blurred Out?)
You may notice the admin username, password, and confirm password fields appear blurred or disabled.
🧠 Why is that?
Because you're using a specialized image — the credentials are already baked into the image. Azure doesn't require you to reset or re-enter them.
✅ Step 6: Review and Create
- Review your configuration.
- Make sure tags, VM size, network, and scaling settings are correct.
- Click Create to deploy the VMSS.
⏳ After a few minutes, your scale set will be up and running!
🎯 Final Thoughts
You’ve now:
- Reused a custom VM image
- Created a scale set
- Configured scaling policies
- Understood why certain options (like specialized images and flexible orchestration) matter
Top comments (0)