Conversation
️✔️AzureCLI-FullTest
|
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
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>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Pull request overview
This PR updates the default VM size/SKU used by Azure CLI compute create commands to move off the legacy Standard_DS1_v2 and align new resource creation with a newer generation default (Standard_D2s_v5). This is a customer-impacting (breaking) behavioral change for users who rely on defaults.
Changes:
- Update
az vm createdefault--sizefromStandard_DS1_v2toStandard_D2s_v5. - Update
az vmss createdefault--vm-skufromStandard_DS1_v2toStandard_D2s_v5(non-USGov). - Remove the existing
_breaking_change.pydefault-value warning registrations for these arguments.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/vm/custom.py |
Changes create_vm function default size to Standard_D2s_v5. |
src/azure-cli/azure/cli/command_modules/vm/_validators.py |
Changes VMSS default vm_sku assignment to Standard_D2s_v5 for non-USGov clouds. |
src/azure-cli/azure/cli/command_modules/vm/_params.py |
Updates help text to claim the new default VMSS size/SKU. |
src/azure-cli/azure/cli/command_modules/vm/_breaking_change.py |
Removes prior default-value breaking-change registrations for vm create/vmss create. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| c.argument('spot_restore_timeout', min_api='2021-04-01', | ||
| help='Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances') | ||
| c.argument('vm_sku', help='The new size of the virtual machine instances in the scale set. Default to "Standard_DS1_v2". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.', is_preview=True) | ||
| c.argument('vm_sku', help='The new size of the virtual machine instances in the scale set. Default to "Standard_D2s_v5". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.', is_preview=True) |
| c.argument('disable_overprovision', help='Overprovision option (see https://azure.microsoft.com/documentation/articles/virtual-machine-scale-sets-overview/ for details).', action='store_true') | ||
| c.argument('health_probe', help='Probe name from the existing load balancer, mainly used for rolling upgrade or automatic repairs') | ||
| c.argument('vm_sku', help='Size of VMs in the scale set. Default to "Standard_DS1_v2". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.') | ||
| c.argument('vm_sku', help='Size of VMs in the scale set. Default to "Standard_D2s_v5". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.') |
|
|
||
| # pylint: disable=too-many-locals, unused-argument, too-many-statements, too-many-branches, broad-except | ||
| def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_v2', location=None, tags=None, | ||
| def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_D2s_v5', location=None, tags=None, |
| if namespace.vm_sku is None: | ||
| from azure.cli.core.cloud import AZURE_US_GOV_CLOUD | ||
| if cmd.cli_ctx.cloud.name != AZURE_US_GOV_CLOUD.name: | ||
| namespace.vm_sku = 'Standard_DS1_v2' | ||
| namespace.vm_sku = 'Standard_D2s_v5' | ||
| else: | ||
| namespace.vm_sku = 'Standard_D1_v2' |
vm create & vmss create: Change default --size/--vm-sku from Standard_DS1_v2 to Standard_D2s_v5vm create & vmss create: Change default --size/--vm-sku from Standard_DS1_v2 to Standard_D2s_v5
Related command
az vm createaz vmss createDescription
Resolve #33170
Testing Guide
History Notes
[Compute] BREAKING CHANGE:
az vm create: Change default--sizefromStandard_DS1_v2toStandard_D2s_v5[Compute] BREAKING CHANGE:
az vmss create: Change default--vm-skufromStandard_DS1_v2toStandard_D2s_v5This 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.