Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Automatic zone placement for Virtual Machine Scale Sets lets Azure select availability zones for your scale set based on capacity and SKU availability. Instead of specifying a fixed list of zones for every region, you configure your placement requirements and Azure selects the zones that best satisfy them.
Automatic zone placement is supported for Virtual Machine Scale Sets with Uniform and Flexible orchestration modes.
Important
Automatic zone placement for Virtual Machine Scale Sets is currently in preview. Previews are made available to you on the condition that you agree to the supplemental terms of use. Some aspects of this feature might change before general availability (GA).
How automatic zone placement works
Automatic zone placement evaluates SKU availability, capacity, and any placement constraints that you configure to select availability zones and place VM instances.
By default, the scale set works toward spreading instances across three availability zones. If you configure maxZoneCount, the scale set instead works toward spreading instances across that number of zones and never exceeds the configured limit. Actual placement depends on SKU availability, capacity, the scale set's current zone distribution, and your other placement constraints. When maxZoneCount isn't configured and the region has more than three availability zones, the scale set can expand beyond its default three-zone spread, such as into a fourth zone, if its current zones can't satisfy a scale-out request.
By default, automatic zone placement:
- Targets an even distribution across three availability zones.
- Requires instances to be distributed across at least two availability zones.
- Limits the number of instances in any single zone to 50 percent of the scale set.
- Can expand to additional availability zones if the current zones don't have enough capacity for more instances and another zone is available in the region.
If capacity isn't available to satisfy all placement requirements, Azure allocates as many instances as the policy allows and the remaining instances may fail to provision. This behavior is a partial allocation failure, not a failure of the entire request.
Note
Automatic zone placement selects zones when new instances are created. It doesn't move or recreate existing instances to correct a zone imbalance. To proactively correct an existing imbalance, see Automatic Zone Balance.
When to use automatic zone placement
Use automatic zone placement when:
- You want a zonal or zone-spanning scale set but don't require instances to be placed in specific availability zones. You can define your zone-spreading requirements and allow Azure to select the zones.
- You deploy across regions where zonal SKU availability differs. Automatic zone placement helps you apply a consistent configuration instead of maintaining region-specific zone lists.
- You want Azure to consider current capacity signals when selecting availability zones.
Use customer-selected availability zones instead when your workload must use specific zones for every placement operation.
Prerequisites
Before you configure automatic zone placement, ensure that:
- You're using Compute API version
2026-03-01or later. - You deploy the scale set in a public Azure region that supports availability zones.
Register the subscription with AFEC
Your subscription must be registered with the Azure Feature Exposure Control (AFEC) flag Microsoft.Compute/VmssAutomaticZonePlacement. This registration is required to enable automatic zone placement feature for your subscription.
- Sign in to the Azure portal.
- In the search box, enter subscriptions, and then select Subscriptions.
- Select your subscription.
- Under Settings, select Preview features.
- Search for VmssAutomaticZonePlacement, and then select the feature.
- Select Register.
Limitations
- A scale set can use either the
zonesproperty for customer-selected zones orplacement.zonePlacementPolicyfor automatic zone placement, but not both. - Proximity placement groups aren't supported.
- Capacity reservation groups aren't supported.
- Instance Mix for Virtual Machine Scale Sets isn't supported during public preview. Expected support by GA.
- Standby pools aren't supported.
- Dedicated host groups aren't supported.
- Edge zones aren't supported.
- Overprovisioning isn't supported. Ensure
overprovisionis set tofalsebefore you addplacement.zonePlacementPolicy; otherwise, the deployment fails. - Service Fabric scale sets aren't supported.
- Creating and attaching a new VM isn't supported. You can attach an existing zonal VM if its zone complies with the scale set's placement configuration.
Configuration properties
The following example shows where automatic zone placement properties appear in a scale set model. Only placement.zonePlacementPolicy is required. All other properties are optional.
{
"placement": {
"zonePlacementPolicy": "auto",
"includeZones": [
"1",
"2",
"4"
]
},
"properties": {
"zoneBalance": false,
"resiliencyPolicy": {
"zoneAllocationPolicy": {
"maxZoneCount": 2,
"maxInstancePercentPerZonePolicy": {
"enabled": true,
"value": 70
}
}
}
}
}
Note
Use either includeZones or excludeZones. You can't configure both properties on the same scale set.
The following properties control automatic zone placement behavior:
| Property | Description |
|---|---|
placement.zonePlacementPolicy |
Required. Set to "auto" to enable automatic zone placement. |
placement.includeZones |
Optional. A list of availability zones that Azure can consider for placement. Azure selects zones only from this list, but might not deploy instances in every listed zone. You can't use this property with excludeZones. |
placement.excludeZones |
Optional. A list of zones that Azure must exclude from placement. You can't use this property with includeZones. |
zoneBalance |
Optional. Controls zone balancing during scaling operations. The default is false, which uses best-effort balancing. When you enable zoneBalance with automatic zone placement, you must also specify maxZoneCount. When zoneBalance is false, maxZoneCount is optional. |
resiliencyPolicy.zoneAllocationPolicy.maxZoneCount |
Optional. The maximum number of zones that the scale set can use. If you don't specify this property, Azure targets three zones and can expand to additional zones when needed to satisfy a scaling request. |
resiliencyPolicy.zoneAllocationPolicy.maxInstancePercentPerZonePolicy.enabled |
Optional. Enables or disables the maximum-instance-percent-per-zone policy. This policy is supported only when zoneBalance is false. |
resiliencyPolicy.zoneAllocationPolicy.maxInstancePercentPerZonePolicy.value |
Optional. The maximum percentage of a scale set's target capacity that can be allocated to a single zone. If satisfying a request would exceed this value, Azure allocates the instances that comply with the policy, and the remaining instances may fail to provision. |
Create a scale set with automatic zone placement
The following scenarios show how to configure automatic zone placement and explain the expected placement behavior. Complete the operating system, storage, and network profiles before you deploy the scale set.
Use default placement behavior
Add placement.zonePlacementPolicy to the scale set resource. Use Compute API version 2026-03-01 or later.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2026-03-01
{
"placement": {
"zonePlacementPolicy": "auto"
}
}
Add this configuration to a complete Virtual Machine Scale Set request.
Expected behavior
If you don't specify any placement constraints, Azure distributes instances evenly across three zones. For example, a scale set with 100 instances might have a distribution of 34, 33, and 33.
If an even three-zone distribution isn't possible, Azure requires instances to span at least two zones and applies a default limit of 50 percent of instances in any one zone. The platform applies this limit even when maxInstancePercentPerZonePolicy isn't explicitly configured.
For example, suppose you request 100 instances and available capacity across three zones is 70, 30, and 0. Azure attempts a distribution of 50, 30, and 20. Because the third zone has no capacity, the final distribution is 50, 30, and 0, and 20 instances fail to provision. To prioritize allocation success over the default distribution limit, configure a higher maxInstancePercentPerZonePolicy.value.
Configure eligible zones
Use either includeZones or excludeZones to control which zones Azure considers during placement. You can't configure both properties on the same scale set.
The following example restricts Azure to only consider zones 1 and 2 for placement.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2026-03-01
{
"placement": {
"zonePlacementPolicy": "auto",
"includeZones": [
"1",
"2"
]
}
}
Alternatively, use excludeZones to prevent Azure from selecting specific zones. The following example excludes zone 3:
{
"placement": {
"zonePlacementPolicy": "auto",
"excludeZones": [
"3"
]
}
}
Expected behavior
When you configure includeZones, Azure selects zones only from the specified list. This setting doesn't guarantee that Azure places instances in every listed zone. Azure continues to consider capacity, SKU availability, the current distribution, and your other placement constraints when placing instances.
When you configure excludeZones, Azure doesn't select or place new instances in the excluded zones. All other supported zones remain eligible. You can't combine includeZones and excludeZones on the same scale set.
Limit the percentage of instances in one zone
Use maxInstancePercentPerZonePolicy to control the maximum percentage of a scale set's target capacity that can be allocated to any one zone. A higher percentage gives Azure more flexibility to satisfy allocation requests but allows more instances to be concentrated in one zone.
The policy is supported only when zoneBalance is false.
Minimum instance percentage
The minimum value depends on the number of zones eligible for placement after Azure applies includeZones, excludeZones, and maxZoneCount:
minimum instance percentage = ceil(100 / number of eligible zones)
For example, suppose includeZones contains zones 1, 2, and 4, and maxZoneCount is 2. The effective number of eligible zones is two, so the minimum valid percentage is 50.
Maximum number of instances in one zone
Azure calculates the maximum number of instances allowed in one zone based on the scale set's target capacity:
maximum instances per zone = ceil(maximum instance percentage * target capacity / 100)
Azure rounds the result up to the nearest whole number. For example, if the target capacity is 101 instances and the maximum instance percentage is 85, the scale set can place up to 86 instances in a single zone.
The following example allows up to 85 percent of instances in one zone:
PUT or PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2026-03-01
{
"placement": {
"zonePlacementPolicy": "auto"
},
"properties": {
"resiliencyPolicy": {
"zoneAllocationPolicy": {
"maxInstancePercentPerZonePolicy": {
"enabled": true,
"value": 85
}
}
}
}
}
Expected behavior
Azure first attempts to distribute instances evenly across three zones. If an even distribution isn't possible, Azure can allocate up to 85 percent of the instances to one zone. This setting gives Azure more flexibility to satisfy allocation requests but allows a higher concentration of instances in one zone.
After a zone reaches the calculated maximum, Azure attempts to place the remaining instances in other eligible zones. If those zones don't have enough capacity, the remaining instances may fail to provision.
For example, suppose you request 100 instances and available capacity across three zones is 90, 10, and 0. Azure attempts a distribution of 85, 10, and 5. Because the third zone has no capacity, the final distribution is 85, 10, and 0, and five instances fail to provision.
Use strict zone balancing
Set zoneBalance to true to require a balanced distribution across the selected zones. You must specify maxZoneCount when strict zone balancing is enabled.
The following example enables strict zone balancing across three zones.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2026-03-01
{
"placement": {
"zonePlacementPolicy": "auto"
},
"properties": {
"zoneBalance": true,
"resiliencyPolicy": {
"zoneAllocationPolicy": {
"maxZoneCount": 3
}
}
}
}
Expected behavior
Azure requires the instance counts across the selected zones to remain within one instance of each other. When you set maxZoneCount to 3, Azure selects up to three zones and maintains strict balance across the zones in use.
If Azure can't maintain strict balance because of capacity or zone availability, the instances that can't be placed within the policy fail to provision. Strict zone balancing can therefore reduce allocation success compared to best-effort balancing.
Enable automatic zone placement on an existing scale set
You can enable automatic zone placement on an existing scale set that uses customer-selected zones or regional placement.
Warning
After you enable automatic zone placement on a regional scale set, you can't return the scale set to regional placement. Existing regional instances remain regional, but Azure places new instances in availability zones.
Before you enable automatic zone placement on a regional scale set, review Prepare for zone expansion.
For a scale set that uses customer-selected zones, clear the zones property and set placement.zonePlacementPolicy to auto in the same update operation. For a regional scale set, set placement.zonePlacementPolicy to auto.
Send a PATCH request to the following endpoint:
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2026-03-01
For a scale set that uses customer-selected zones, clear zones and enable automatic zone placement in the same request:
{
"zones": [],
"placement": {
"zonePlacementPolicy": "auto"
}
}
For a regional scale set, enable automatic zone placement without specifying zones:
{
"placement": {
"zonePlacementPolicy": "auto"
}
}
Expected behavior
The update enables automatic zone placement for new instances. Existing instances aren't moved or recreated.
For a scale set that uses customer-selected zones, existing instances remain in their current availability zones. For a regional scale set, existing regional instances remain regional. Azure uses automatic zone placement when it places new instances.
If your placement requirements change, you can switch from automatic zone placement back to customer-selected zones. In the same update operation, clear placement.zonePlacementPolicy and set the zones property. This update doesn't move or recreate existing instances.
Next steps
- Review availability zone options for Virtual Machine Scale Sets.
- Learn about zone balancing in Virtual Machine Scale Sets.
- Learn about Automatic Zone Balance.