[Compute] Add BestEffortAligned storage FD alignment support for VMSS Flex#29575
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
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
ZonalPlatformFaultDomainAlignModefor VMSS Flex create/update flows. - Added per-disk
StorageFaultDomainAlignmentsupport 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. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
audreyttt
left a comment
There was a problem hiding this comment.
Overall looks good, tests need to be verified and recorded
|
Hi @Dthomas0729, please fix test errors. |
f040f4d to
2d45100
Compare
2d45100 to
c813d33
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@microsoft-github-policy-service agree company="Microsoft" |
|
Hi, @Sandido, @grizzlytheodore, @haagha, could you please review this PR and approve it if it's ready? |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@YanaXu approved |
Agent-Logs-Url: https://github.com/Azure/azure-powershell/sessions/3fdac09c-315d-46f9-a050-f29297b7ba37 Co-authored-by: haagha <64601174+haagha@users.noreply.github.com>
…ds for alignment support
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>
1a5adc8 to
09d6983
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Adds
BestEffortAlignedstorage 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:
using Microsoft.WindowsAzure.Commands.Utilities.CommoninAddAzureVMDataDiskCommand.cs(IsParameterBoundwas unresolvable)ZonalPlatformFaultDomainAlignModehandling toBuildPutObject()inUpdate-AzVmss— the PUT path was silently dropping the propertyTest-VirtualMachineScaleSetConfigStorageFaultDomainAlignmentto be end-to-end (creates VNet, VMSS, and verifies viaGet-AzVmssround-trip)Test-VMStorageFaultDomainAlignmentcoveringSet-AzVMOSDiskandAdd-AzVMDataDiskwithStorageFaultDomainAlignmentNew Parameters
New-AzVmssConfig-ZonalPlatformFaultDomainAlignModeNew-AzVmss(SimpleParameterSet)-ZonalPlatformFaultDomainAlignModeUpdate-AzVmss-ZonalPlatformFaultDomainAlignModeSet-AzVmssStorageProfile-OsDiskStorageFaultDomainAlignmentAdd-AzVmssDataDisk-StorageFaultDomainAlignmentSet-AzVMOSDisk-StorageFaultDomainAlignmentAdd-AzVMDataDisk-StorageFaultDomainAlignment