Skip to content

[Compute] az vm/vmss create/update: Support --add-proxy-agent-extension parameter to specify whether to implicitly install the ProxyAgent Extension#32298

Merged
yanzhudd merged 23 commits intoAzure:devfrom
naga-nandyala:naga/vm_add_proxy_extension
Nov 5, 2025
Merged

[Compute] az vm/vmss create/update: Support --add-proxy-agent-extension parameter to specify whether to implicitly install the ProxyAgent Extension#32298
yanzhudd merged 23 commits intoAzure:devfrom
naga-nandyala:naga/vm_add_proxy_extension

Conversation

@naga-nandyala
Copy link
Copy Markdown
Contributor

@naga-nandyala naga-nandyala commented Oct 21, 2025

Related command

az vm create
az vm update
az vmss create
az vmss update

Description
aaz PR: Azure/aaz#885
close: #32154

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

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

azure-client-tools-bot-prd bot commented Oct 21, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

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

Hi @naga-nandyala,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

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

azure-client-tools-bot-prd bot commented Oct 21, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm create cmd vm create added parameter add_proxy_agent_extension
⚠️ 1006 - ParaAdd vm update cmd vm update added parameter add_proxy_agent_extension
⚠️ 1006 - ParaAdd vmss create cmd vmss create added parameter add_proxy_agent_extension
⚠️ 1006 - ParaAdd vmss update cmd vmss update added parameter add_proxy_agent_extension

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Oct 21, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@naga-nandyala naga-nandyala changed the title Naga/vm add proxy extension {Compute} VM/VMSS support add-proxy-agent-extension parameter Oct 22, 2025
@naga-nandyala naga-nandyala force-pushed the naga/vm_add_proxy_extension branch 2 times, most recently from 7315987 to e369dd2 Compare October 28, 2025 02:27
.gitignore Outdated
Comment on lines +125 to +127

_scratch*
**/nagavm/ No newline at end of file
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.

please exclude these personal configurations to the PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +1687 to +1689
class Update(_Update):
pass

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.

May I ask why we need these two lines?

Suggested change
class Update(_Update):
pass

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed this as we are not overrideing any logic

vm = get_vm_to_update(cmd, resource_group_name, vm_name)

if add_proxy_agent_extension is not None:
from .aaz.latest.vm import Update as _Update
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.

It has been imported in the line 49:

from .aaz.latest.vm import Update as UpdateVM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This has been removed and i am using import at the beginning of the file

vm = get_vm_to_update(cmd, resource_group_name, vm_name)

if add_proxy_agent_extension is not None:
from .aaz.latest.vm import Update as _Update
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.

Suggested change
from .aaz.latest.vm import Update as _Update

}))
vm = get_vm_to_update(cmd, resource_group_name, vm_name)

if add_proxy_agent_extension is not None:
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.

We should not make another request for new parameters. We need to add the new parameter to the existing request body and send the request together.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed we will go with this approach to deliver the feature. we will then implement better migration for update_vm and update_vmss

}))
vmss = get_vmss_modified(cmd, resource_group_name, name, instance_id, security_type)

if add_proxy_agent_extension is not None:
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.

We should not make another request for new parameters. We need to add the new parameter to the existing request body and send the request together.

@naga-nandyala naga-nandyala force-pushed the naga/vm_add_proxy_extension branch from 25cefc2 to 8d84213 Compare November 3, 2025 00:39
@naga-nandyala naga-nandyala force-pushed the naga/vm_add_proxy_extension branch from 4d80a6a to 1cb74ac Compare November 5, 2025 04:40
@naga-nandyala naga-nandyala marked this pull request as ready for review November 5, 2025 05:27
Copilot AI review requested due to automatic review settings November 5, 2025 05:27
Copy link
Copy Markdown
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 PR adds support for the add_proxy_agent_extension parameter to VM and VMSS commands, allowing users to specify whether to implicitly install the ProxyAgent Extension for Linux OS. The changes also include:

  • Updating API versions from 2024-11-01 to 2025-04-01 in AAZ auto-generated files
  • Adding test coverage updates including skipping tests due to subscription feature requirements and changing test configurations (location, images, size)
  • Various formatting and code structure improvements in AAZ files

Reviewed Changes

Copilot reviewed 5 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test_vm_commands.py Skips disk encryption tests, updates proxy agent test location and images from Windows to Linux, adds validation for add_proxy_agent_extension parameter
custom.py Adds add_proxy_agent_extension parameter handling to VM/VMSS create and update functions, imports UpdateVMSS
_update.py (vmss) Updates to API version 2025-04-01, adds add_proxy_agent_extension schema support and various new properties
_update.py (vm) Updates to API version 2025-04-01, adds add_proxy_agent_extension schema support and various new properties
_template_builder.py Adds add_proxy_agent_extension parameter to build_vm_resource and build_vmss_resource functions
_params.py Adds CLI argument definition for add_proxy_agent_extension parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1685 to +1687
if add_proxy_agent_extension is not None:

args = {
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Empty line after the if statement reduces code readability. Remove the blank line after line 1685.

Copilot uses AI. Check for mistakes.
vm = get_vm_to_update(cmd, resource_group_name, vm_name)

if add_proxy_agent_extension is not None:

Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Empty line after the if statement reduces code readability. Remove the blank line after line 4221.

Suggested change

Copilot uses AI. Check for mistakes.
yanzhudd
yanzhudd previously approved these changes Nov 5, 2025
@yanzhudd yanzhudd changed the title {Compute} VM/VMSS support add-proxy-agent-extension parameter [Compute] az vm/vmss create/update: Support --add-proxy-agent-extension parameter to specify whether to implicitly install the ProxyAgent Extension Nov 5, 2025
@yanzhudd
Copy link
Copy Markdown
Contributor

yanzhudd commented Nov 5, 2025

since this change is visible to users, please use [Compute] instead of {Compute} in the title.
moreover, please include some details in the title/history notes section in future PRs, as they will show up in the release notes.
please refer to this document: https://github.com/Azure/azure-cli/tree/dev/doc/authoring_command_modules#submitting-pull-requests

I've already helped to refine it for this PR.

@yanzhudd yanzhudd merged commit 1c8b8e4 into Azure:dev Nov 5, 2025
48 checks passed
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.

VM/VMSS support add-proxy-agent-extension parameter

5 participants