[Compute] az vm/ vmss create/ update: Support use local file rules parameter - #33894
[Compute] az vm/ vmss create/ update: Support use local file rules parameter#33894William (william051200) wants to merge 5 commits into
az vm/ vmss create/ update: Support use local file rules parameter#33894Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Compute |
There was a problem hiding this comment.
Pull request overview
This PR updates the vm command module to support configuring WireServer proxy-agent local file rules via a new CLI parameter, aligned with the newer Compute API version required for the feature.
Changes:
- Add
--wire-server-use-local-file-rulesforaz vm create/updateandaz vmss create/update, wiring it tosecurityProfile.proxyAgentSettings.wireServer.useLocalFileRules. - Bump VM/VMSS ARM template API versions and AAZ-generated VM/VMSS command schemas to
2026-04-01. - Add a scenario test validating create/show/update for VM and VMSS with WireServer local file rules enabled/disabled.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py | Adds scenario coverage for WireServer useLocalFileRules on VM and VMSS. |
| src/azure-cli/azure/cli/command_modules/vm/operations/vm.py | Extends snake_case conversion to include wireServer.useLocalFileRules. |
| src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py | Extends snake_case conversion to include wireServer.useLocalFileRules. |
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Plumbs wire_server_use_local_file_rules through VM/VMSS create/update request shaping. |
| src/azure-cli/azure/cli/command_modules/vm/_template_builder.py | Emits useLocalFileRules into ARM template payloads for VM/VMSS WireServer settings; bumps apiVersion to 2026-04-01. |
| src/azure-cli/azure/cli/command_modules/vm/_params.py | Introduces CLI argument definition for --wire-server-use-local-file-rules. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py | Updates AAZ VM create schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py | Updates AAZ VM update schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py | Updates AAZ VM show schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py | Updates AAZ VM wait schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py | Updates AAZ VMSS create schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py | Updates AAZ VMSS update schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py | Updates AAZ VMSS show schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py | Updates AAZ VMSS wait schema/version to 2026-04-01 and includes useLocalFileRules in host endpoint settings schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| c.argument('wire_server_mode', arg_type=get_enum_type(ProxyAgentMode), help='Specify the mode that proxy agent will execute on if the feature is enabled.') | ||
| c.argument('wire_server_use_local_file_rules', options_list=['--wire-server-use-local-file-rules', '--wire-server-local-rules'], arg_type=get_three_state_flag(), help='When set to true, instructs the GuestProxyAgent inside the VM to load additional access control rules defined in a local file on the VM.') | ||
| c.argument('wire_server_access_control_profile_reference_id', options_list=['--wire-server-access-control-profile-reference-id', '--wire-server-profile-id'], help='Specify the access control profile version resource id of wire server.') | ||
| c.argument('imds_mode', arg_type=get_enum_type(ProxyAgentMode), help='Specify the mode that proxy agent will execute on if the feature is enabled.') | ||
| c.argument('imds_access_control_profile_reference_id', options_list=['--imds-access-control-profile-reference-id', '--imds-profile-id'], help='Specify the access control profile version resource id resource id of imds.') |
| c.argument('v_cpus_available', type=int, help='Specify the number of vCPUs available') | ||
| c.argument('v_cpus_per_core', type=int, help='Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.') | ||
| c.argument('disk_controller_type', disk_controller_type) | ||
| c.argument('enable_proxy_agent', arg_type=get_three_state_flag(), help='Specify whether metadata security protoco (proxy agent) feature should be enabled on the virtual machine or virtual machine scale set.') |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Live test results —
|
There was a problem hiding this comment.
The following CI checks are failing:
- Azure.azure-cli
- Azure.azure-cli Full Test
- Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance1)
- Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance2)
- Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance2)
- Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance7)
- Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance7)
- Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance8)
- Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance1)
- Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance8)
- Azure.azure-cli (Check the Format of Pull Request Title and Content)
- Live test run failed (see the dispatched
live-test.ymlworkflow run for details).
🤖 PR Validation — ❌ Action needed
❌AzureCLI-FullTest
Related command
az vm create/ update/ showaz vmss create/ update/ showDescription
Resolve #33771
aaz Azure/aaz#1063
Testing Guide
Refer to
azure-cli\src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py:test_vm_vmss_wire_server_use_local_file_rulesHistory Notes
[Compute]
az vm: Add new parameterwire-server-use-local-file-rulesto support use local file rules[Compute]
az vmss: Add new parameterwire-server-use-local-file-rulesto support use local file rulesThis 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.