azure-compute

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Azure Compute Skill

Azure Compute Skill

Recommend Azure VM sizes, VM Scale Sets (VMSS), and configurations by analyzing workload type, performance requirements, scaling needs, and budget. No Azure subscription required — all data comes from public Microsoft documentation and the unauthenticated Retail Prices API.
通过分析工作负载类型、性能要求、缩放需求和预算,推荐Azure VM大小、VM Scale Sets (VMSS)及配置。无需Azure订阅——所有数据均来自Microsoft公开文档和无需认证的Retail Prices API。

When to Use This Skill

何时使用此技能

  • User asks which Azure VM or VMSS to choose for a workload
  • User needs VM size recommendations for web, database, ML, batch, HPC, or other workloads
  • User wants to compare VM families, sizes, or pricing tiers
  • User asks about trade-offs between VM options (cost vs performance)
  • User needs a cost estimate for Azure VMs without an Azure account
  • User asks whether to use a single VM or a scale set
  • User needs autoscaling, high availability, or load-balanced VM recommendations
  • User asks about VMSS orchestration modes (Flexible vs Uniform)
  • 用户询问针对某一工作负载应选择哪种Azure VM或VMSS
  • 用户需要针对Web、数据库、ML、批处理、HPC或其他工作负载的VM大小推荐
  • 用户希望对比VM系列、大小或定价层级
  • 用户询问VM选项之间的权衡(成本vs性能)
  • 用户无需Azure账户即可获取Azure VM的成本估算
  • 用户询问应使用单个VM还是规模集
  • 用户需要自动缩放、高可用性或负载均衡VM的推荐
  • 用户询问VMSS编排模式(Flexible vs Uniform)

Workflow

工作流程

Use reference files for initial filtering
CRITICAL: then always verify with live documentation from learn.microsoft.com before making final recommendations. If
web_fetch
fails, use reference files as fallback but warn the user the information may be stale.
使用参考文件进行初始筛选
重要提示: 在给出最终推荐前,务必通过learn.microsoft.com的实时文档进行验证。如果
web_fetch
失败,可使用参考文件作为备选,但需提醒用户信息可能已过期。

Step 1: Gather Requirements

步骤1:收集需求

Ask the user for (infer when possible):
RequirementExamples
Workload typeWeb server, relational DB, ML training, batch processing, dev/test
vCPU / RAM needs"4 cores, 16 GB RAM" or "lightweight" / "heavy"
GPU needed?Yes → GPU families; No → general/compute/memory
Storage needsHigh IOPS, large temp disk, premium SSD
Budget priorityCost-sensitive, performance-first, balanced
OSLinux or Windows (affects pricing)
RegionAffects availability and price
Instance countSingle instance, fixed count, or variable/dynamic
Scaling needsNone, manual scaling, autoscale based on metrics or schedule
Availability needsBest-effort, fault-domain isolation, cross-zone HA
Load balancingNot needed, Azure Load Balancer (L4), Application Gateway (L7)
向用户询问(可在可能的情况下推断):
需求项示例
工作负载类型Web服务器、关系型数据库、ML训练、批处理、开发/测试环境
vCPU / 内存需求"4核,16 GB内存" 或 "轻量级" / "重型"
是否需要GPU?是 → GPU系列;否 → 通用/计算/内存优化型
存储需求高IOPS、大临时磁盘、高级SSD
预算优先级成本敏感型、性能优先型、平衡型
操作系统Linux或Windows(会影响定价)
区域影响可用性和价格
实例数量单实例、固定数量或可变/动态数量
缩放需求无、手动缩放、基于指标或计划的自动缩放
可用性需求尽力而为、故障域隔离、跨区域高可用
负载均衡不需要、Azure Load Balancer(L4)、Application Gateway(L7)

Step 2: Determine VM vs VMSS

步骤2:确定使用VM还是VMSS

Workflow:
  1. Review VMSS Guide to understand when VMSS vs single VM is appropriate
  2. Use the gathered requirements to decide which approach fits best
  3. REQUIRED: If recommending VMSS, fetch current documentation to verify capabilities:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-autoscale-overview
  4. If
    web_fetch
    fails
    , proceed with reference file guidance but include this warning:
    Unable to verify against latest Azure documentation. Recommendation based on reference material that may not reflect recent updates.
text
Needs autoscaling?
├─ Yes → VMSS
├─ No
│  ├─ Multiple identical instances needed?
│  │  ├─ Yes → VMSS
│  │  └─ No
│  │     ├─ High availability across fault domains / zones?
│  │     │  ├─ Yes, many instances → VMSS
│  │     │  └─ Yes, 1-2 instances → VM + Availability Zone
│  │     └─ Single instance sufficient? → VM
SignalRecommendationWhy
Autoscale on CPU, memory, or scheduleVMSSBuilt-in autoscale; no custom automation needed
Stateless web/API tier behind a load balancerVMSSHomogeneous fleet with automatic distribution
Batch / parallel processing across many nodesVMSSScale out on demand, scale to zero when idle
Mixed VM sizes in one groupVMSS (Flexible)Flexible orchestration supports mixed SKUs
Single long-lived server (jumpbox, AD DC)VMNo scaling benefit; simpler management
Unique per-instance config requiredVMScale sets assume homogeneous configuration
Stateful workload, tightly-coupled clusterVM (or VMSS case-by-case)Evaluate carefully; VMSS Flexible can work for some stateful patterns
Warning: If the user is unsure, default to single VM for simplicity. Recommend VMSS only when scaling, HA, or fleet management is clearly needed.
工作流程:
  1. 查看VMSS指南,了解何时适合使用VMSS而非单个VM
  2. 根据收集到的需求决定哪种方案更合适
  3. 必填:如果推荐VMSS,获取当前文档以验证功能:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-autoscale-overview
  4. 如果
    web_fetch
    失败
    ,继续使用参考文件的指导,但需包含以下警告:
    无法通过最新Azure文档进行验证。推荐内容基于参考材料,可能无法反映最新更新。
text
需要自动缩放?
├─ 是 → VMSS
├─ 否
│  ├─ 需要多个相同实例?
│  │  ├─ 是 → VMSS
│  │  └─ 否
│  │     ├─ 需要跨故障域/区域的高可用性?
│  │     │  ├─ 是,多个实例 → VMSS
│  │     │  └─ 是,1-2个实例 → VM + 可用性区域
│  │     └─ 单实例足够? → VM
信号推荐方案原因
基于CPU、内存或计划的自动缩放VMSS内置自动缩放功能;无需自定义自动化
负载均衡后的无状态Web/API层VMSS同构实例集群,支持自动流量分发
跨多个节点的批处理/并行处理VMSS按需横向扩展,空闲时可缩容至零
同一组中混合不同VM大小VMSS (Flexible)灵活编排模式支持混合SKU
单个长期运行的服务器(跳转机、AD域控制器)VM无缩放收益;管理更简单
需要每个实例的独特配置VM规模集假设实例配置同构
有状态工作负载、紧耦合集群VM(或视情况使用VMSS)需仔细评估;VMSS Flexible模式可适配部分有状态场景
注意: 如果用户不确定,默认推荐单个VM以简化操作。仅当明确需要缩放、高可用性或集群管理时,才推荐VMSS。

Step 3: Select VM Family

步骤3:选择VM系列

Workflow:
  1. Review VM Family Guide to identify 2-3 candidate VM families that match the workload requirements
  2. REQUIRED: verify specifications for your chosen candidates by fetching current documentation:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/<family-category>/<series-name>
    Examples:
    • B-series:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/b-family
    • D-series:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/ddsv5-series
    • GPU:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nc-family
  3. If considering Spot VMs, also fetch:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/use-spot
  4. If
    web_fetch
    fails
    , proceed with reference file guidance but include this warning:
    Unable to verify against latest Azure documentation. Recommendation based on reference material that may not reflect recent updates or limitations (e.g., Spot VM compatibility).
This step applies to both single VMs and VMSS since scale sets use the same VM SKUs.
工作流程:
  1. 查看VM系列指南,确定2-3个符合工作负载需求的候选VM系列
  2. 必填:验证规格,通过获取当前文档确认所选候选的参数:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/<family-category>/<series-name>
    示例:
    • B系列:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/b-family
    • D系列:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/ddsv5-series
    • GPU:
      https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nc-family
  3. 如果考虑Spot VMs,还需获取:
    bash
    web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/use-spot
  4. 如果
    web_fetch
    失败
    ,继续使用参考文件的指导,但需包含以下警告:
    无法通过最新Azure文档进行验证。推荐内容基于参考材料,可能无法反映最新更新或限制(如Spot VM兼容性)。
此步骤适用于单个VM和VMSS,因为规模集使用相同的VM SKU。

Step 4: Look Up Pricing

步骤4:查询定价

Query the Azure Retail Prices API — Retail Prices API Guide
Tip: VMSS has no extra charge — pricing is per-VM instance. Use the same VM pricing from the API and multiply by the expected instance count to estimate VMSS cost. For autoscaling workloads, estimate cost at both the minimum and maximum instance count.
调用Azure Retail Prices API —— 零售价格API指南
提示: VMSS无额外费用——定价按VM实例计算。使用API中的相同VM定价,乘以预期实例数量即可估算VMSS成本。对于自动缩放工作负载,需估算最小和最大实例数量下的成本。

Step 5: Present Recommendations

步骤5:呈现推荐方案

Provide 2–3 options with trade-offs:
ColumnPurpose
Hosting ModelVM or VMSS (with orchestration mode if VMSS)
VM SizeARM SKU name (e.g.,
Standard_D4s_v5
)
vCPUs / RAMCore specs
Instance Count1 for VM; min–max range for VMSS with autoscale
Estimated $/hrPer-instance pay-as-you-go from API
WhyFit for the workload
Trade-offWhat the user gives up
Tip: Always explain why a family fits and what the user trades off (cost vs cores, burstable vs dedicated, single VM simplicity vs VMSS scalability, etc.).
For VMSS recommendations, also mention:
  • Recommended orchestration mode (Flexible for most new workloads)
  • Autoscale strategy (metric-based, schedule-based, or both)
  • Load balancer type (Azure Load Balancer for L4, Application Gateway for L7/TLS)
提供2-3个选项并说明权衡:
列名用途
托管模型VM或VMSS(若为VMSS需注明编排模式)
VM大小ARM SKU名称(如
Standard_D4s_v5
vCPUs / 内存核心规格
实例数量VM为1;带自动缩放的VMSS为最小-最大范围
预估每小时费用来自API的按实例按需付费价格
推荐理由适配工作负载的原因
权衡点用户需要做出的取舍
提示: 务必解释为什么该系列适配,以及用户需要权衡的点(成本vs核心数、可突增vs专用、单个VM的简洁性vs VMSS的可扩展性等)。
对于VMSS推荐,还需提及:
  • 推荐的编排模式(大多数新工作负载使用Flexible)
  • 自动缩放策略(基于指标、基于计划或两者结合)
  • 负载均衡器类型(L4使用Azure Load Balancer,L7/TLS使用Application Gateway)

Step 6: Offer Next Steps

步骤6:提供后续步骤

Error Handling

错误处理

ScenarioAction
API returns empty resultsBroaden filters — check
armRegionName
,
serviceName
,
armSkuName
spelling
User unsure of workload typeAsk clarifying questions; default to General Purpose D-series
Region not specifiedUse
eastus
as default; note prices vary by region
Unclear if VM or VMSS neededAsk about scaling and instance count; default to single VM if unsure
User asks VMSS pricing directlyUse same VM pricing API — VMSS has no extra charge; multiply by instance count
场景操作
API返回空结果放宽筛选条件——检查
armRegionName
serviceName
armSkuName
的拼写
用户不确定工作负载类型询问澄清问题;默认推荐通用型D系列
未指定区域使用
eastus
作为默认值;注明价格因区域而异
不确定是否需要VM或VMSS询问缩放需求和实例数量;若不确定则默认推荐单个VM
用户直接询问VMSS定价使用相同的VM定价API——VMSS无额外费用;乘以实例数量计算总价

References

参考资料

  • VM Family Guide — Family-to-workload mapping and selection
  • Retail Prices API Guide — Query patterns, filters, and examples
  • VMSS Guide — When to use VMSS, orchestration modes, and autoscale patterns
  • VM系列指南 —— 系列与工作负载的映射及选择
  • 零售价格API指南 —— 查询模式、筛选条件及示例
  • VMSS指南 —— 何时使用VMSS、编排模式及自动缩放模式