Skip to content

VMSS Automatic Zone Placement CLI Support #31951

@hilaryw29

Description

@hilaryw29

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

Related command

az vmss create, az vmss update

Resource Provider

Microsoft.Compute/VMSS

Description of Feature or Work Requested

Automatic Zone Placement simplifies the process of deploying zonal resources by allowing the platform to determine the optimal zone(s) for allocations based on live capacity signals and customer constraints. SKU availability and zonal capacity can vary significantly across different Azure regions. Customers have limited insight into the capacity landscape for their SKUs, this can lead to sub-optimal zone selections and scaling challenges. With Automatic Zone Placement, customers no longer have to manually specify a "zones" list. VMSS will identify the "best" zones to deploy VMs based on capacity signals and customer-configured policies. Full spec / overview of the current workflow is available here.

Minimum API Version Required

2024-07-01

Swagger PR link / SDK link

This feature will be part of the 2025-04-01 swagger release. Link to the PR for our swagger changes here.

Once the swagger is rolled out, it should be available here (under 2025-04-01).

Relevant swagger parameters:

  • "placement.zonePlacementPolicy"
  • "placement.includeZones"
  • "placement.excludeZones"
  • "ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.enabled"
  • "ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.value"
  • "ZoneAllocationPolicy.MaxZoneCount"

Request Example

Impacted CLI Commands: az vmss create, az vmss update

We would like to support the following parameters on vmss create and update commands so that customers can use Automatic Zone Placement on their scale sets.

"--zone-placement-policy", { "Auto" }

  • Whether Automatic Zone Placement with be applied for this VMSS. If customer has ZonePlacementPolicy specified, they cannot have the "zones" list on their VMSS.
  • This property is currently not updatable, so only 'az vmss create' support is needed

"--includeZones", { int list }

  • List of zones that must be included when platform is selecting zones. Including a specific zone does not guarantee that instances will be placed in the zone, but the zone will be available for future scale outs.
  • This property is currently not updatable, so only 'az vmss create' support is needed

"--excludeZones", { int list }

  • List of zones that must be excluded when selecting zones.
  • This property is currently not updatable, so only 'az vmss create' support is needed

"--max-zone-count", { int }

  • The maximum number of zones across which instances will be spread. If maxZoneCount is not specified, the scale set will try to spread VMs across 3 AZs but may deploy to additional zones (4th, 5th AZ) when necessary to fulfill capacity requests.

"--enable-max-instance-percent-per-zone", { bool }

  • If maxInstancePercentPerZone should be enabled. Customers will have to specify both enableMaxInstancePercentPerZone and valueMaxInstancePercentPerZone in order to apply maxInstancePercentPerZone on their VMSS.

"--value-max-instance-percent-per-zone", { int }

  • The value for maximum % of VMs that can be allocated in a single zone.
  • For example: if valueMaxInstancePercentPerZone = 50, this means that at any time, no more than 50% of the VMs in your scale set can be allocated to a single zone.

Target Date

April 30th, 2026

PM Contact

hilarywang@microsoft.com

Engineer Contact

frankpang@microsoft.com, christinakiruba.christopher@microsoft.com, raredd@microsoft.com

Additional context

Some properties that may conflict / cannot be enabled on the scale set if customer has Automatic Zone Placement

  • "Overprovision", must be false if zonePlacementPolicy is being used on the scale set
  • "ProximityPlacementGroupId", zonePlacementPolicy is currently not supported with proximity placement groups and capacity reservation groups.
  • "zones", zonePlacementPolicy cannot be enabled if "zones" list exists on the scale set

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions