Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Select, configure, and scale Azure compute resources—VMs, App Service, AKS, and Container Apps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
workflows/vm-recommender/vm-recommender.md
1# Azure VM Recommender23Recommend Azure VM sizes, VM Scale Sets (VMSS), and configurations by analyzing workload type, performance requirements, scaling needs, and budget. No Azure subscription required — data comes from public Microsoft documentation and the unauthenticated Retail Prices API.45## When to Use This Skill67- User asks which Azure VM or VMSS to choose for a workload8- User wants to compare VM families, sizes, or pricing tiers9- User asks about trade-offs (cost vs performance, single VM vs scale set, orchestration modes)10- User needs a cost estimate without an Azure subscription11- User asks "Needs autoscaling?" or wants to decide between a single VM and a scale set1213## Workflow1415> Use reference files for initial filtering. Then **verify with live documentation** via `web_fetch` before final recommendations. If `web_fetch` fails, fall back to the reference files and surface the staleness warning from [web-fetch-policy.md](references/web-fetch-policy.md).1617### Step 1: Gather Requirements1819Ask the user (infer when possible):2021| Requirement | Examples |22|---|---|23| Workload type | Web server, relational DB, ML training, batch, dev/test |24| vCPU / RAM needs | "4 cores, 16 GB" or "lightweight" / "heavy" |25| GPU needed? | Yes → GPU families; No → general / compute / memory |26| Storage needs | High IOPS, large temp disk, premium SSD |27| Budget priority | Cost-sensitive, performance-first, balanced |28| OS | Linux or Windows (affects pricing) |29| Region | Affects availability and price |30| Instance count | Single, fixed count, or variable |31| Scaling needs | None, manual, autoscale (metrics / schedule) |32| Availability needs | Best-effort, fault-domain, cross-zone HA |33| Load balancing | None, Azure Load Balancer (L4), Application Gateway (L7) |3435### Step 2: Determine VM vs VMSS3637Review [VMSS Guide](../../references/vmss-guide.md). Decision shortcut — start by asking **Needs autoscaling?** then walk the table:3839| Signal | Pick |40|---|---|41| Autoscale on CPU, memory, or schedule | **VMSS** |42| Stateless web/API tier behind a load balancer | **VMSS** |43| Batch / parallel processing across many nodes | **VMSS** |44| Mixed VM sizes in one group | **VMSS (Flexible)** |45| Single long-lived server (jumpbox, AD DC) | **VM** |46| Unique per-instance config | **VM** |47| Stateful, tightly-coupled cluster | **VM** (or VMSS case-by-case) |4849If recommending VMSS, verify with `web_fetch` per [web-fetch-policy.md](references/web-fetch-policy.md). When in doubt, default to a single **VM**.5051### Step 3: Select VM Family5253Review [VM Family Guide](../../references/vm-families.md) and pick 2–3 candidate families. Verify each candidate's specs with `web_fetch` against:5455```56https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/<family-category>/<series-name>57```5859For Spot eligibility, also fetch `https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/use-spot`. If any fetch fails, follow [web-fetch-policy.md](references/web-fetch-policy.md). Same SKUs apply to single VMs and VMSS.6061### Step 4: Look Up Pricing6263Query the Azure Retail Prices API per [Retail Prices API Guide](../../references/retail-prices-api.md).6465> **VMSS:** no extra charge — pricing is per-VM. Multiply per-instance price × expected count. For autoscale, estimate at both `min` and `max`.6667### Step 5: Validate Quota Availability6869> **GATE — do not present recommendations until quota is validated.**7071If the user has a subscription + region, review and run the checks from [VM Quota Validation Guide](../../references/vm-quotas.md). Without a subscription, note quota must be checked before deployment.7273| Outcome | Action |74|---|---|75| ✅ Sufficient | Proceed to Step 6 |76| ⚠️ Near limit (>80%) | Proceed but warn; suggest quota increase |77| ❌ Insufficient | Request increase, swap family, or try another region |7879Include a "Quota Status" column (✅/⚠️/❌) in the table.8081### Step 6: Present Recommendations8283Provide **2–3 options** with trade-offs:8485| Column | Purpose |86|---|---|87| Hosting Model | VM or VMSS (with orchestration mode if VMSS) |88| VM Size | ARM SKU name (e.g., `Standard_D4s_v5`) |89| vCPUs / RAM | Core specs |90| Instance Count | `1` for VM; `min–max` for VMSS with autoscale |91| Estimated $/hr | Per-instance pay-as-you-go |92| Why | Workload fit |93| Trade-off | What the user gives up |9495Always explain *why* a family fits and the Trade-off (cost vs cores, burstable vs dedicated, VM simplicity vs VMSS scale).9697For VMSS, also mention orchestration mode (default **Flexible**), autoscale strategy (metric / schedule / both), and load balancer type.9899### Step 7: Offer Next Steps100101- Compare reservation / savings plan pricing (`priceType eq 'Reservation'` in the API)102- Suggest [Azure Pricing Calculator](https://azure.microsoft.com/pricing/calculator/) for full estimates103- For VMSS: [autoscale best practices](https://learn.microsoft.com/azure/azure-monitor/autoscale/autoscale-best-practices), [VMSS networking](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking)104105### Step 8: Hand Off to VM Creator (Optional)106107If the user wants to **actually provision** what was recommended, hand off to [vm-creator](../vm-creator/vm-creator.md). See [handoff-to-creator.md](references/handoff-to-creator.md) for the required Plan Card render and routing rules.108109## Error Handling110111| Scenario | Action |112|---|---|113| API returns empty results | Broaden filters — check `armRegionName`, `serviceName`, `armSkuName` spelling |114| User unsure of workload type | Ask clarifying questions; default to General Purpose D-series |115| Region not specified | Use `eastus` as default; note prices vary by region |116| Unclear if VM or VMSS needed | Ask about scaling + instance count; default to single VM if still unsure |117| User asks VMSS pricing directly | Same VM pricing API; VMSS has no extra charge — multiply by instance count |118119## References120121- [VM Family Guide](../../references/vm-families.md) — family-to-workload mapping122- [Retail Prices API Guide](../../references/retail-prices-api.md) — query patterns, filters123- [VMSS Guide](../../references/vmss-guide.md) — when to use VMSS, orchestration, autoscale124- [VM Quota Validation Guide](../../references/vm-quotas.md) — vCPU checks, CLI commands125- [web-fetch-policy.md](references/web-fetch-policy.md) — fail-safe behavior for live docs lookups126- [handoff-to-creator.md](references/handoff-to-creator.md) — Step 8 hand-off rules127- [vm-creator](../vm-creator/vm-creator.md) — provision the recommended SKU128