{Compute} vm update - Fix zone movement bug#33441
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
Fixes az vm update behavior so that omitting --zone-movement no longer overwrites the VM’s existing zone movement setting with null/None, which could unintentionally disable or clear the service-side configuration during unrelated updates (e.g., zone change).
Changes:
- Guard
resiliency_profile.zone_movement.is_enabledassignment so it is only written whenzone_movementis explicitly provided. - Preserve existing
resiliencyProfile.zoneMovementstate on updates that don’t specify--zone-movement.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az vm updateDescription
zone movement is always assigned to
Noneif value is not provided.Testing Guide
History Notes
This 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.