{Compute} az vm/vmss: Add new param --processor-mode to support processor mode - #33985
Open
William (william051200) wants to merge 6 commits into
Open
{Compute} az vm/vmss: Add new param --processor-mode to support processor mode#33985William (william051200) wants to merge 6 commits into
az vm/vmss: Add new param --processor-mode to support processor mode#33985William (william051200) wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
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) forvm create/updateandvmss 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 processorMode → processor_mode. |
| src/azure-cli/azure/cli/command_modules/vm/operations/vm.py | Extends internal show-result snake_case conversion to include processorMode → processor_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.') |
microsoft-github-policy-service
Bot
requested review from
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
August 25, 2026 23:48
Collaborator
|
Compute |
Contributor
|
🔔 Routing this PR to @Azure/act-observability-squad. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation —⚠️ Review suggested
Related command
az vm create/ update/ showaz vmss create/ update/ showDescription
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_modecurrently not able to run yet. no perm
History Notes
[Compute]
az vm: Add new param--processor-modeto support processor mode[Compute]
az vmss: Add new param--processor-modeto support processor modeThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.