Skip to content

{Compute} az vm/vmss: Add new param --processor-mode to support processor mode - #33985

Open
William (william051200) wants to merge 6 commits into
Azure:devfrom
william051200:processor-mode
Open

{Compute} az vm/vmss: Add new param --processor-mode to support processor mode#33985
William (william051200) wants to merge 6 commits into
Azure:devfrom
william051200:processor-mode

Conversation

@william051200

@william051200 William (william051200) commented Aug 25, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm create cmd vm create added parameter processor_mode
⚠️ 1006 - ParaAdd vm update cmd vm update added parameter processor_mode
⚠️ 1006 - ParaAdd vmss create cmd vmss create added parameter processor_mode
⚠️ 1006 - ParaAdd vmss update cmd vmss update added parameter processor_mode

Related command

az vm create/ update/ show
az vmss create/ update/ show

Description

Resolve #33449

Testing Guide

Refer to azure-cli\src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py: test_vm_processor_mode
currently not able to run yet. no perm

History Notes

[Compute] az vm: Add new param --processor-mode to support processor mode
[Compute] az vmss: Add new param --processor-mode to support processor mode


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI lite review requested due to automatic review settings August 25, 2026 23:40
@william051200
William (william051200) requested a review from a team as a code owner August 25, 2026 23:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for a new --processor-mode argument across az vm and az vmss command flows, enabling users to set the Compute RP hardwareProfile.processorMode property during create/update and validate it via show output.

Changes:

  • Introduces --processor-mode (Deterministic/Opportunistic) for vm create/update and vmss create/update.
  • Wires the new argument into VM/VMSS request construction (ARM template builder + update payload shaping) and internal snake_case conversion helpers.
  • Adds a live-only scenario test covering create/show/update for both VM and VMSS.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py Adds a new live-only scenario test validating processorMode behavior for VM and VMSS.
src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py Extends internal show-result snake_case conversion to include processorModeprocessor_mode.
src/azure-cli/azure/cli/command_modules/vm/operations/vm.py Extends internal show-result snake_case conversion to include processorModeprocessor_mode.
src/azure-cli/azure/cli/command_modules/vm/custom.py Threads processor_mode through VM/VMSS create and update flows and populates the update payload.
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py Sets hardwareProfile.processorMode in VM/VMSS ARM template resources when provided.
src/azure-cli/azure/cli/command_modules/vm/_params.py Adds the --processor-mode CLI argument and enum choices.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1426 to +1429
c.argument('processor_mode', arg_type=get_enum_type(ProcessorMode),
help='Specifies the processor mode for the virtual machine or virtual machine scale set. '
'Optional; if omitted, the platform default applies (currently Deterministic). '
'This property can be updated on a running VM or VMSS without deallocation or reboot.')
@yonzhan

Copy link
Copy Markdown
Collaborator

Compute

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-observability-squad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot do-not-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VM Processor Mode

4 participants