# Azure Virtual Machine Scale Set

> A Virtual Machine Scale Set multiplies one VM's compute meter by its instance count, so an idle 10-instance set wastes ten machines' worth of spend overnight. ZopNight deallocates every instance on stop, restarts them on start, analyzes 60 days of metrics for rightsizing, and ships an azure:vmss autoscaler provider.

Source: https://zop.dev/integrations/azure/vmss
Updated: 2026-08-19

---

Virtual Machine Scale Sets run and manage groups of identical, load-balanced VMs that can scale automatically. A scale set left running overnight multiplies the cost of a single idle VM by its instance count.

## Instance count multiplies the meter

A scale set has no meter of its own. Every instance inside it is a VM billing for allocated compute, with a managed disk billing by provisioned size beside it. The set's cost is therefore linear in instance count: whatever one instance of that SKU costs per hour, multiply by however many are allocated. Autoscale rules bound the count while traffic moves, but a floor of even a few instances keeps that multiple running through nights and weekends.

## Deallocating a whole set at once

On a scheduled stop, ZopNight deallocates the set's instances, which halts compute billing for the whole group; on start they are restarted together. As with single VMs, deallocation is the operative word: a guest shutdown inside each instance would leave every allocation, and every charge, in place. Instance disks continue billing while the set sleeps. Scale sets that back AKS agent pools are deliberately not touched directly; those are managed through the AKS resource types so the Kubernetes layer stays consistent.

## Scale-set coverage in ZopNight

Azure Resource Graph returns each set with instance counts and SKU details. Sixty days of Azure Monitor metrics drive utilization analysis, Cost Management attributes what the set actually spent, and rightsizing recommendations flag sets that are oversized or persistently underused. ZopNight also ships an azure:vmss autoscaler provider, letting schedules and autoscaling cooperate rather than compete.

## Overnight waste, multiplied by N

Look for autoscale minimums set during an incident and never lowered; staging sets mirroring production's instance count for traffic that never arrives; and load-test fleets that finished their test weeks ago. Each pattern is a single-VM mistake made N times simultaneously.

## Scale sets in the Azure portal

Azure portal → Virtual machine scale sets shows each set with its instance count; the Instances blade lists every member VM and its individual power state, which is where a half-deallocated set becomes visible.
