Add compute VM and VMSS create/update commands with smart workload-based defaults#1705
Add compute VM and VMSS create/update commands with smart workload-based defaults#1705g2vinay merged 36 commits intomicrosoft:mainfrom
Conversation
…up, VmName, and VmssName
- Created assets.json for test asset configuration. - Added Azure.Mcp.Tools.Compute.UnitTests project file. - Implemented VmGetCommandTests to validate VM retrieval commands. - Developed PowerShell script for post-deployment resource checks. - Created Bicep template for resource provisioning in tests. - Added JSON deployment template for resource management.
…nce ID and VMSS name; update JSON serialization and error handling for improved clarity and flexibility.
…get-operations
- Removed unused ListVmSizesAsync method from IComputeService. - Updated ComputeCommandTests to reflect changes in VM and VMSS naming conventions. - Adjusted test resources to deploy a single VM and VMSS with updated sizes. - Added new unit tests for VMSS get operations, including validation and error handling. - Updated changelog to document the addition of VMSS get operations.
…anitization; update assets.json with tag value.
- Updated the description for VmGetCommand to clarify the behavior based on parameters and streamline the information provided. - Revised the description for VmssGetCommand to enhance clarity on the retrieval of VMSS and their instances, focusing on the details returned. - Removed outdated specialized resource collection patterns from new-command.md to simplify documentation.
- Implemented VmCreateCommand to facilitate the creation of Azure VMs. - Introduced VmCreateResult model to encapsulate the results of VM creation. - Enhanced ComputeOptionDefinitions with new options for VM creation, including size, image, and workload. - Created VmCreateOptions class to manage input parameters for VM creation. - Updated ComputeService to handle VM creation logic, including network and security group setup. - Added workload configurations to suggest optimal VM sizes based on workload type. - Implemented unit tests for VmCreateCommand to ensure correct behavior and validation of inputs.
…ements and SSH key discovery
- Removed SSH key auto-discovery from ~/.ssh/ (problematic for remote MCP servers) - Require explicit --ssh-public-key or --admin-password for Linux VMs - Updated tool description with clear instructions for SSH key workflow - Added helpful validation error message guiding users to read SSH public key first
- Add VmUpdateCommand for updating VM properties (size, tags, license type, boot diagnostics, user data) - Add VmssCreateCommand for creating VMSS with smart workload defaults - Add VmssUpdateCommand for updating VMSS properties (capacity, upgrade policy, overprovision, auto-os-upgrade, scale-in-policy, tags) - Add corresponding Options, Result models, and service implementations - Register new commands in ComputeSetup and JSON serialization context
…create/update commands
… haagha/vm-create
|
@g2vinay resolved the changes and added tool description analysis in the description: Tool Selection Analysis Results SummaryTotal Prompts Tested: 46 Success Rate MetricsTop Choice Success: 97.8% (45/46 tests) Confidence Level Distribution💪 Very High Confidence (≥0.8): 0.0% (0/46 tests) Top Choice + Confidence Combinations💪 Top Choice + Very High Confidence (≥0.8): 0.0% (0/46 tests) Success Rate Analysis🟢 Excellent - The tool selection system is performing exceptionally well. |
…ress-prefix, fix GUIDs, improve error handling and validation
|
All feedback has been addressed. The secret emitted by the create commands is the admin password ( |
…ing resources when missing
…matic networking provisioning
Summary
Addresses tools from #1452
This PR adds four new compute commands for creating and updating Azure Virtual Machines (VMs) and Virtual Machine Scale Sets (VMSS):
azmcp compute vm create- Create a new virtual machineazmcp compute vm update- Update an existing virtual machineazmcp compute vmss create- Create a new virtual machine scale setazmcp compute vmss update- Update an existing virtual machine scale setCommand Parameters
compute vm create--vm-name--resource-group--subscription--location--vm-size--image--admin-username--admin-password--ssh-public-key--workload--os-type--virtual-network--subnet--public-ip-address--network-security-group--no-public-ip--zone--os-disk-size-gb--os-disk-typecompute vm update--vm-name--resource-group--subscription--vm-size--tags--license-type--boot-diagnostics--user-datacompute vmss create--vmss-name--resource-group--subscription--location--vm-size--image--admin-username--admin-password--ssh-public-key--workload--os-type--virtual-network--subnet--instance-count--upgrade-policy--zone--os-disk-size-gb--os-disk-typecompute vmss update--vmss-name--resource-group--subscription--vm-size--capacity--upgrade-policy--overprovision--enable-auto-os-upgrade--scale-in-policy--tagsChanges
Documentation
azmcp-commands.mdwith full command documentatione2eTestPrompts.mdconsolidated-tools.jsonwith tool groupingsREADME.mdwith example promptsTests
Changelog
ToolDescriptionEvaluator Results
43 prompts tested for compute tools:
Testing
Azure/azure-sdk-assetswith tagAzure.Mcp.Tools.Compute.LiveTests_8c431d915f## Tool Selection Analysis Results Summary
Total Prompts Tested: 46
Analysis Execution Time: 7.9322877s
Success Rate Metrics
Top Choice Success: 97.8% (45/46 tests)
Confidence Level Distribution
💪 Very High Confidence (≥0.8): 0.0% (0/46 tests)
🎯 High Confidence (≥0.7): 4.3% (2/46 tests)
✅ Good Confidence (≥0.6): 34.8% (16/46 tests)
👍 Fair Confidence (≥0.5): 87.0% (40/46 tests)
👌 Acceptable Confidence (≥0.4): 100.0% (46/46 tests)
❌ Low Confidence (<0.4): 0.0% (0/46 tests)
Top Choice + Confidence Combinations
💪 Top Choice + Very High Confidence (≥0.8): 0.0% (0/46 tests)
🎯 Top Choice + High Confidence (≥0.7): 4.3% (2/46 tests)
✅ Top Choice + Good Confidence (≥0.6): 34.8% (16/46 tests)
👍 Top Choice + Fair Confidence (≥0.5): 84.8% (39/46 tests)
👌 Top Choice + Acceptable Confidence (≥0.4): 97.8% (45/46 tests)
Success Rate Analysis
🟢 Excellent - The tool selection system is performing exceptionally well.