Azure / Azure/azure-cli

[Feature Request] Support Aligned Zonal Fault Domains for VMSS Flex

Open
#32,693 14 comments 0 reactions 1 assignee Assigned to @yanzhudd View on GitHub
act-observability-squad Auto-Assign Azure CLI Team Compute feature-request Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Service Team Request**

**API Spec**: https://github.com/Azure/azure-rest-api-specs/pull/39109
**Feature Description**: Aligned Zonal Fault Domains for VMSS Flex — enables 1:1 mapping between compute fault domains and storage fault partitions within a single Availability Zone
**Target Service Public Preview**: 2026-06-30
**Target CLI Release**: CLI 2.87.0 — **2026-06-02**

> **Updated 2026-05-04** — design has firmed up; this issue body now reflects the final cmdlet/CLI surface as agreed with the service team. The corresponding PowerShell design review is [Azure/azure-powershell-cmdlet-review-pr#1548](https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1548).

---

## Preview Requirements

> ⚠️ **Feature Flag Required During Preview**
> Register the following AFEC on your subscription:
>
> ```bash
> az feature register --namespace Microsoft.Compute --name ZonalAlignedMultipleFDs
> az provider register --namespace Microsoft.Compute
> ```

---

## Requested Commands

### New Parameters for Existing Commands

| Command | Parameter | Type | Allowed Values | Notes |
|---------|-----------|------|----------------|-------|
| `az vmss create` | `--zonal-fault-domain-align-mode` | string | `Aligned`, `Unaligned`, `BestEffortAligned` | VMSS-level alignment mode |
| `az vmss create` | `--os-disk-storage-fd-alignment` | string | `Aligned`, `BestEffortAligned` | Per-disk override. Omit to leave unaligned. |
| `az vmss create` | `--data-disk-storage-fd-alignment` | string | `Aligned`, `BestEffortAligned` | Per-disk override. Omit to leave unaligned. |
| `az vm create` | `--os-disk-storage-fd-alignment` | string | `Aligned`, `BestEffortAligned` | Only valid when `--vmss` joins a Flex VMSS. |
| `az vm create` | `--data-disk-storage-fd-alignment` | string | `Aligned`, `BestEffortAligned` | Only valid when `--vmss` joins a Flex VMSS. |

### Important Constraints

1. **Per-disk values do NOT include `Unaligned`.** CRP returns `BadRequest` if `Unaligned` is sent at the disk level. To leave a disk unaligned, **omit the parameter** — do not pass `Unaligned`.
2. **Per-disk alignment is only valid for VMs in a Flex VMSS.** CRP returns `BadRequest` if either per-disk parameter is set on a standalone VM not joined to a Flex VMSS.
3. **Per-disk alignment is set-at-create only** — values cannot be changed via update.
4. **VMSS-level alignment IS updatable** via `az vmss update --set zonalPlatformFaultDomainAlignMode=...`.
5. **Flexible orchestration only.** Aligned/BestEffortAligned modes are not supported for Uniform VMSS.
6. **Single zone only.** Alignment only applies when the VMSS is deployed to a single Availability Zone.

### No New Commands Required

Updates leverage generic `--set` for `az vmss update`.

---

## Example Usage

```bash
# 1. Create VMSS with full (strict) alignment
az vmss create \
--name myVmss \
--resource-group myRg \
--location eastus2 \
--zones 1 \
--orchestration-mode Flexible \
--platform-fault-domain-count 3 \
--zonal-fault-domain-align-mode Aligned \
--image Ubuntu2204 \
--vm-sku Standard_D4s_v5 \
--instance-count 3

# 2. Create VMSS with best-effort alignment + per-disk override on OS disk
az vmss create \
--name myVmss \
--resource-group myRg \
--location eastus2 \
--zones 1 \
--orchestration-mode Flexible \
--platform-fault-domain-count 3 \
--zonal-fault-domain-align-mode BestEffortAligned \
--os-disk-storage-fd-alignment BestEffortAligned \
--image Ubuntu2204 \
--vm-sku Standard_D4s_v5

# 3. Constrained disk-type case: OS disk on Premium LRS forced aligned;
# data disk on Premium SSD v2 left unaligned by OMITTING the parameter
az vmss create \
--name myVmss \
--resource-group myRg \
--location eastus2 \
--zones 1 \
--orchestration-mode Flexible \
--platform-fault-domain-count 3 \
--zonal-fault-domain-align-mode BestEffortAligned \
--os-disk-storage-fd-alignment Aligned \
--image Ubuntu2204 \
--vm-sku Standard_D4s_v5
# (Do NOT pass --data-disk-storage-fd-alignment Unaligned — that fails. Omit it.)

# 4. Update existing VMSS (only VMSS-level mode is updatable)
az vmss update \
--name myVmss \
--resource-group myRg \
--set zonalPlatformFaultDomainAlignMode=BestEffortAligned

# 5. Query disk alignment status (read-only) via VM instance view
az vm get-instance-view \
--ids $(az vmss list-instances --resource-group myRg --name myVmss --query "[].id" -o tsv) \
--query "{vm:name, disks:instanceView.disks[].{name:name, alignmentState:storageAlignmentStatus}}"
```

---

## API Properties

| Model | Property | Type | Allowed Values | Notes |
|-------|----------|------|----------------|-------|
| `VirtualMachineScaleSet.properties` | `zonalPlatformFaultDomainAlignMode` | Enum | `Aligned`, `Unaligned`, `BestEffortAligned` | Updatable |
| `VirtualMachineScaleSetUpdate.properties` | `zonalPlatformFaultDomainAlignMode` | Enum | same as above | Update path |
| `VirtualMachineScaleSetOSDisk` | `storageFaultDomainAlignment` | Enum | `Aligned`, `BestEffortAligned` | Per-disk; create-only; omit for unaligned |
| `VirtualMachineScaleSetDataDisk` | `storageFaultDomainAlignment` | Enum | `Aligned`, `BestEffortAligned` | Per-disk; create-only; omit for unaligned |
| `OSDisk` (VM) | `storageFaultDomainAlignment` | Enum | `Aligned`, `BestEffortAligned` | Flex VMSS member only |
| `DataDisk` (VM) | `storageFaultDomainAlignment` | Enum | `Aligned`, `BestEffortAligned` | Flex VMSS member only |
| `DiskInstanceView` (read-only) | `storageAlignmentStatus` | Enum | `Aligned`, `Unaligned` | Current alignment state |

---

## Dependencies

- Swagger PR: https://github.com/Azure/azure-rest-api-specs/pull/39109
- **Minimum API version: `2025-11-01`** (was `2025-04-01` in the original request — updated)
- Related commands: `az vmss create`, `az vmss update`, `az vm create`, `az vm get-instance-view`, `az disk show`
- Orchestration mode: **Flexible only**
- Companion design review (PowerShell): [Azure/azure-powershell-cmdlet-review-pr#1548](https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1548)

---

## Contact

- **PM**: Jerry Steele (fisteele@microsoft.com / @fitzgeraldsteele)
- **Engineering**: Dominique Thomas (dothomas@microsoft.com / @Dthomas0729)
- **Service Team**: Azure Compute VM Team

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.