Skip to content

[Compute] Add BestEffortAligned storage FD alignment support for VMSS Flex#29575

Merged
YanaXu merged 7 commits into
Azure:mainfrom
Dthomas0729:copilot/az-compute-add-best-effort-aligned-support
May 22, 2026
Merged

[Compute] Add BestEffortAligned storage FD alignment support for VMSS Flex#29575
YanaXu merged 7 commits into
Azure:mainfrom
Dthomas0729:copilot/az-compute-add-best-effort-aligned-support

Conversation

@Dthomas0729
Copy link
Copy Markdown
Member

Adds BestEffortAligned storage Fault Domain (FD) alignment mode to VMSS Flex, plus per-disk alignment controls on both VMSS templates and individual VMs within a Flex VMSS.

Based on PR #29496 (AI-generated draft) with the following fixes:

  1. Build fix: Added missing using Microsoft.WindowsAzure.Commands.Utilities.Common in AddAzureVMDataDiskCommand.cs (IsParameterBound was unresolvable)
  2. Bug fix: Added ZonalPlatformFaultDomainAlignMode handling to BuildPutObject() in Update-AzVmss — the PUT path was silently dropping the property
  3. Test improvement: Updated Test-VirtualMachineScaleSetConfigStorageFaultDomainAlignment to be end-to-end (creates VNet, VMSS, and verifies via Get-AzVmss round-trip)
  4. Test addition: Added Test-VMStorageFaultDomainAlignment covering Set-AzVMOSDisk and Add-AzVMDataDisk with StorageFaultDomainAlignment

New Parameters

Cmdlet Parameter Values
New-AzVmssConfig -ZonalPlatformFaultDomainAlignMode Aligned, Unaligned, BestEffortAligned
New-AzVmss (SimpleParameterSet) -ZonalPlatformFaultDomainAlignMode same
Update-AzVmss -ZonalPlatformFaultDomainAlignMode same (mutable on existing VMSS)
Set-AzVmssStorageProfile -OsDiskStorageFaultDomainAlignment Aligned, BestEffortAligned
Add-AzVmssDataDisk -StorageFaultDomainAlignment Aligned, BestEffortAligned
Set-AzVMOSDisk -StorageFaultDomainAlignment Aligned, BestEffortAligned
Add-AzVMDataDisk -StorageFaultDomainAlignment Aligned, BestEffortAligned

Copilot AI review requested due to automatic review settings May 12, 2026 14:57
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds BestEffortAligned storage Fault Domain alignment support for VMSS Flex at both the VMSS level (ZonalPlatformFaultDomainAlignMode) and per-disk level (StorageFaultDomainAlignment), surfacing the new properties through cmdlet parameters, models, and help.

Changes:

  • Added new cmdlet parameters and wiring to persist ZonalPlatformFaultDomainAlignMode for VMSS Flex create/update flows.
  • Added per-disk StorageFaultDomainAlignment support for VM OS/data disks and VMSS template disks.
  • Updated help markdown, changelog, and added new scenario tests for the new parameters.

Reviewed changes

Copilot reviewed 16 out of 21 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/Compute/Compute/VirtualMachine/Config/SetAzureVMOSDiskCommand.cs Adds -StorageFaultDomainAlignment to Set-AzVMOSDisk and sets the SDK model property when bound.
src/Compute/Compute/VirtualMachine/Config/AddAzureVMDataDiskCommand.cs Adds -StorageFaultDomainAlignment to Add-AzVMDataDisk and populates DataDisk.StorageFaultDomainAlignment.
src/Compute/Compute/Strategies/ComputeRp/VirtualMachineScaleSetStrategy.cs Extends the Flex VMSS strategy builder to carry ZonalPlatformFaultDomainAlignMode.
src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs Adds -ZonalPlatformFaultDomainAlignMode to New-AzVmss (SimpleParameterSet) and passes it into the strategy.
src/Compute/Compute/help/Update-AzVmss.md Documents the new -ZonalPlatformFaultDomainAlignMode parameter.
src/Compute/Compute/help/Set-AzVmssStorageProfile.md Documents -OsDiskStorageFaultDomainAlignment for VMSS template OS disk.
src/Compute/Compute/help/Set-AzVMOSDisk.md Documents -StorageFaultDomainAlignment for VM OS disks.
src/Compute/Compute/help/New-AzVmssConfig.md Documents -ZonalPlatformFaultDomainAlignMode for VMSS config objects.
src/Compute/Compute/help/New-AzVmss.md Documents -ZonalPlatformFaultDomainAlignMode for New-AzVmss SimpleParameterSet.
src/Compute/Compute/help/Add-AzVmssDataDisk.md Documents -StorageFaultDomainAlignment for VMSS template data disks.
src/Compute/Compute/help/Add-AzVMDataDisk.md Documents -StorageFaultDomainAlignment for VM data disks.
src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateMethod.cs Adds ZonalPlatformFaultDomainAlignMode handling to both PATCH and PUT object builders.
src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssStorageProfileCommand.cs Adds -OsDiskStorageFaultDomainAlignment and sets OsDisk.StorageFaultDomainAlignment in the VMSS config.
src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs Adds -ZonalPlatformFaultDomainAlignMode to New-AzVmssConfig and sets it on the config object.
src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssDataDiskCommand.cs Adds -StorageFaultDomainAlignment and assigns it to the VMSS template data disk model.
src/Compute/Compute/Generated/Models/PSVirtualMachineScaleSet.cs Surfaces ZonalPlatformFaultDomainAlignMode on the PS VMSS model for round-tripping.
src/Compute/Compute/ChangeLog.md Adds upcoming release notes for the new alignment parameters.
src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1 Adds a new scenario test function for VM OS/data disk alignment parameters.
src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs Registers the new VM alignment scenario test as a check-in test.
src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1 Adds scenario tests validating VMSS-level and template-level alignment settings.
src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.cs Registers the new VMSS alignment scenario tests as check-in tests.

Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs
Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1
Comment thread src/Compute/Compute/help/Set-AzVMOSDisk.md
Comment thread src/Compute/Compute/help/Add-AzVMDataDisk.md
@audreyttt
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@audreyttt audreyttt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, tests need to be verified and recorded

@YanaXu
Copy link
Copy Markdown
Contributor

YanaXu commented May 15, 2026

Hi @Dthomas0729, please fix test errors.

Copilot AI review requested due to automatic review settings May 15, 2026 17:17
@Dthomas0729 Dthomas0729 force-pushed the copilot/az-compute-add-best-effort-aligned-support branch from f040f4d to 2d45100 Compare May 15, 2026 17:17
@Dthomas0729 Dthomas0729 force-pushed the copilot/az-compute-add-best-effort-aligned-support branch from 2d45100 to c813d33 Compare May 15, 2026 17:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 24 changed files in this pull request and generated 3 comments.

Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1 Outdated
Copilot AI review requested due to automatic review settings May 15, 2026 17:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 24 changed files in this pull request and generated 8 comments.

Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1 Outdated
Comment thread src/Compute/Compute/help/Set-AzVMOSDisk.md
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@Dthomas0729 Dthomas0729 requested a review from audreyttt May 18, 2026 14:38
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@Dthomas0729
Copy link
Copy Markdown
Member Author

@microsoft-github-policy-service agree company="Microsoft"

@YanaXu
Copy link
Copy Markdown
Contributor

YanaXu commented May 19, 2026

Hi, @Sandido, @grizzlytheodore, @haagha, could you please review this PR and approve it if it's ready?

Copilot AI review requested due to automatic review settings May 19, 2026 14:33
@audreyttt
Copy link
Copy Markdown
Member

/azp run

audreyttt
audreyttt previously approved these changes May 19, 2026
@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audreyttt
Copy link
Copy Markdown
Member

@YanaXu approved

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 24 changed files in this pull request and generated 6 comments.

Comment thread src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs
Comment thread src/Compute/Compute/help/Update-AzVmss.md
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Copilot AI and others added 6 commits May 21, 2026 15:24
asserting on the property being non-null/one-of('Aligned','Unaligned') instead, or using -StorageFaultDomainAlignment 'Aligned'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Dthomas0729 Dthomas0729 force-pushed the copilot/az-compute-add-best-effort-aligned-support branch from 1a5adc8 to 09d6983 Compare May 21, 2026 19:25
@Dthomas0729 Dthomas0729 requested a review from YanaXu May 21, 2026 19:36
@YanaXu
Copy link
Copy Markdown
Contributor

YanaXu commented May 22, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Compute/Compute/ChangeLog.md Outdated
Copilot AI review requested due to automatic review settings May 22, 2026 04:11
@audreyttt
Copy link
Copy Markdown
Member

/azp run

@audreyttt audreyttt requested a review from YanaXu May 22, 2026 04:16
@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 24 changed files in this pull request and generated no new comments.

@YanaXu YanaXu enabled auto-merge (squash) May 22, 2026 04:43
@YanaXu YanaXu merged commit a260d2f into Azure:main May 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants