-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Adding Automatic Zone Placement #28882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds Automatic Zone Placement functionality for Virtual Machine Scale Sets (VMSS) by introducing four new parameters to New-AzVmssConfig, Update-AzVmss, and New-AzVmss cmdlets. The feature enables automatic distribution of VMSS instances across availability zones with configurable constraints, addressing the requirements outlined in the linked design document.
Key changes:
- Added
ZonePlacementPolicyparameter to control automatic zone selection (values: "Any" for VMs, "Auto" for VMSS) - Added
MaxZoneCountparameter to limit the maximum number of zones used when policy is "Auto" - Added
EnableMaxInstancePercentPerZoneswitch andValueMaxInstancePercentPerZoneto control the percentage distribution of VMs per zone - Implemented validation to ensure
Overprovisionis false whenZonePlacementPolicyis specified
Reviewed changes
Copilot reviewed 9 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Compute/Compute/ChangeLog.md | Added changelog entry documenting the new parameters, but with incorrect casing |
| src/Compute/Compute/help/New-AzVmss.md | Added documentation for ZonePlacementPolicy parameter in New-AzVmss cmdlet |
| src/Compute/Compute/help/New-AzVmssConfig.md | Added documentation for all four new parameters in New-AzVmssConfig cmdlet |
| src/Compute/Compute/help/Update-AzVmss.md | Added documentation for all four new parameters in Update-AzVmss cmdlet |
| src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs | Implemented parameter definitions and zone placement logic for config cmdlet, with nested value parameter handling |
| src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateMethod.cs | Implemented parameter definitions and zone placement logic for update cmdlet with critical bugs in parameter type and object assignment |
| src/Compute/Compute/Generated/Models/PSVirtualMachineScaleSet.cs | Added Placement property to the PowerShell model object |
| src/Compute/Compute/Manual/PSVirtualMachineScaleSet.cs | Added convenience ZonePlacementPolicy string property for simple parameter set |
| src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs | Added ZonePlacementPolicy parameter to New-AzVmss simple parameter set |
| src/Compute/Compute/Strategies/ComputeRp/VirtualMachineScaleSetStrategy.cs | Updated VMSS creation strategy to include Placement object with ZonePlacementPolicy |
| src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdate.cs | Added Placement property to SDK update model |
| src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1 | Added comprehensive test covering creation and update scenarios with zone placement parameters |
| src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.cs | Added test entry point for new zone placement test |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Description
Adding four new parameters to New-AzVmssConfig and Update-AzVmss, as requested in this design: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1510
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.