compute_vm_create: Update default VM size from Standard_DS1_v2 to Standard_D2s_v5 and Fix Option Bindings for VMSS update#2415
Conversation
… commands and documentation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Azure Compute tool defaults to use a newer VM size and fixes option parsing so vmss update can accept capacity and related tri-state flags.
Changes:
- Change default VM size for
vm create/vmss createfromStandard_DS1_v2toStandard_D2s_v5across service logic, tests, and docs. - Fix VMSS update option typing by making
--capacity,--overprovision, and--enable-auto-os-upgradenullable to distinguish “not provided” vs “set”. - Add changelog entries and update server docs/e2e prompts to reflect the new defaults.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Vmss/VmssUpdateCommandTests.cs | Adds a new validation case for --capacity in vmss update. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Vmss/VmssCreateCommandTests.cs | Updates expected VMSS default size to Standard_D2s_v5. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Vm/VmCreateCommandTests.cs | Updates expected VM default size to Standard_D2s_v5. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.LiveTests/ComputeCommandTests.cs | Updates live test assertions for VM size. |
| tools/Azure.Mcp.Tools.Compute/src/Services/ComputeService.cs | Changes default VM size constant and related comments. |
| tools/Azure.Mcp.Tools.Compute/src/Options/ComputeOptionDefinitions.cs | Updates help text and makes VMSS update options nullable. |
| tools/Azure.Mcp.Tools.Compute/src/ComputeSetup.cs | Updates tool description default-size text. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Vmss/VmssCreateCommand.cs | Updates command description default-size text. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Vm/VmCreateCommand.cs | Updates command description default-size text. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Updates e2e prompt to the new default size. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Updates docs for default size for VM and VMSS create. |
| servers/Azure.Mcp.Server/changelog-entries/1776182026573.yaml | Adds changelog entry for VMSS update option fix. |
| servers/Azure.Mcp.Server/changelog-entries/1775768065287.yaml | Adds changelog entry for default VM size change. |
| eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json | Updates evaluator prompt tool description default-size text. |
|
|
||
| // Default VM size matching Azure CLI (az vm create --size default) | ||
| private const string DefaultVmSize = "Standard_DS1_v2"; | ||
| // Default VM size (D-series v5: 2 vCPU, 8 GB RAM, available in all regions) |
There was a problem hiding this comment.
The comment claims Standard_D2s_v5 is “available in all regions”, which is not a safe guarantee and can become inaccurate (availability varies by region/subscription and can change over time). Consider removing the region-availability claim and keeping the comment to the intent (tool default) and the approximate spec, or link to authoritative docs if the statement must remain.
| // Default VM size (D-series v5: 2 vCPU, 8 GB RAM, available in all regions) | |
| // Default VM size (D-series v5, approximately 2 vCPU and 8 GB RAM) |
| [--os-disk-type <os-disk-type>] | ||
|
|
||
| Defaults to the Azure CLI baseline of Standard_DS1_v2 size and the Ubuntu2404 image when not specified. When new NSG rules are created, SSH/RDP access is allowed from any source unless `--source-address-prefix` is provided. | ||
| Defaults to the Azure CLI baseline of Standard_D2s_v5 size and the Ubuntu2404 image when not specified. When new NSG rules are created, SSH/RDP access is allowed from any source unless `--source-address-prefix` is provided. |
There was a problem hiding this comment.
This line states “Defaults to the Azure CLI baseline of Standard_D2s_v5”, but the tool’s default is a product choice and may not match Azure CLI defaults (which have historically differed and may change independently). Suggest rewording to avoid attributing this to Azure CLI, e.g. “Defaults to Standard_D2s_v5 size …” unless there’s a verified source that Azure CLI’s baseline is indeed D2s_v5.
| Defaults to the Azure CLI baseline of Standard_D2s_v5 size and the Ubuntu2404 image when not specified. When new NSG rules are created, SSH/RDP access is allowed from any source unless `--source-address-prefix` is provided. | |
| Defaults to Standard_D2s_v5 size and the Ubuntu2404 image when not specified. When new NSG rules are created, SSH/RDP access is allowed from any source unless `--source-address-prefix` is provided. |
| [Theory] | ||
| [InlineData("--vmss-name test-vmss --resource-group test-rg --subscription sub123 --upgrade-policy Automatic", true)] | ||
| [InlineData("--vmss-name test-vmss --resource-group test-rg --subscription sub123 --capacity 5", true)] | ||
| [InlineData("--vmss-name test-vmss --resource-group test-rg --subscription sub123 --tags env=test", true)] | ||
| [InlineData("--vmss-name test-vmss --resource-group test-rg --subscription sub123 --scale-in-policy OldestVM", true)] | ||
| [InlineData("--vmss-name test-vmss --resource-group test-rg --subscription sub123", false)] // No update property |
There was a problem hiding this comment.
The changelog claims vmss update now accepts --capacity, --overprovision, and --enable-auto-os-upgrade, but this test only adds coverage for --capacity. Add InlineData cases for --overprovision true/false and --enable-auto-os-upgrade true/false (and any expected failure cases) to ensure the option-type change actually fixes parsing/binding for those flags.
| changes: | ||
| - section: "Bugs Fixed" | ||
| description: "Fixed `vmss update` command not accepting `--capacity`, `--overprovision`, or `--enable-auto-os-upgrade` options due to option type mismatch" No newline at end of file |
There was a problem hiding this comment.
This PR includes a functional bug fix to vmss update option parsing in addition to the default VM size change described by the PR title, and the PR description template is still unfilled. Please update the PR description (and ideally the title) to explicitly include the vmss update option parsing fix, or split into separate PRs if you want to keep changes scoped to the default-size update.
What does this PR do?
This PR changes the default size of VM and VMSS creation from Standard_DS1_v2 to Standard_DS2_v2.
This PR will also fixes bugs relating to VMSS update options binding.
GitHub issue number?
#2244
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline