Skip to content

Conversation

@audreyttt
Copy link
Member

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

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@azure-client-tools-bot-prd
Copy link

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

Copilot AI review requested due to automatic review settings December 1, 2025 19:51
Copilot finished reviewing on behalf of audreyttt December 1, 2025 19:57
Copy link
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

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 ZonePlacementPolicy parameter to control automatic zone selection (values: "Any" for VMs, "Auto" for VMSS)
  • Added MaxZoneCount parameter to limit the maximum number of zones used when policy is "Auto"
  • Added EnableMaxInstancePercentPerZone switch and ValueMaxInstancePercentPerZone to control the percentage distribution of VMs per zone
  • Implemented validation to ensure Overprovision is false when ZonePlacementPolicy is 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.

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.

1 participant