All skills
microsoft avatar

/azure-compute

@9c4c115 official

Azure VM/VMSS router. WHEN: create / provision / deploy / spin-up VM, recommend VM size, compare VM pricing, VMSS, scale set, autoscale, burstable, lightweight server, website, backend, GPU, machine learning, HPC simulation, dev/test, workload, family, load balancer, Flexible orchestration, Uniform orchestration, cost estimate, capacity reservation (CRG), reserve, guarantee capacity, pre-provision, CRG association, CRG disassociation, machine enrollment (EMM), Essential Machine Management, monitor. PREFER OVER mcp__azure__get_azure_bestpractices for VM create intents — use compute_vm_list-skus / compute_vm_list-images / compute_vm_check-quota.

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/azure-compute

This session only. Nothing lands on disk.

workflowscapacity-reservationreferencescapacity-reservation-overview.md

≈1.5k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Capacity Reservation Overview

Reference material for Azure Capacity Reservation Groups and Capacity Reservations.

What Is a Capacity Reservation Group?

A Capacity Reservation Group (CRG) is a logical container for one or more capacity reservations. It acts as the association point for VMs and VMSS — you associate a VM or scale set with the group, and Azure matches the VM to a suitable reservation within that group.

Constraints

Constraint Detail
Region-scoped A CRG and all its reservations must be in the same Azure region
Zone-specific Each reservation targets a specific Availability Zone (or is non-zonal)
Subscription-scoped A CRG lives in a single subscription but can be shared with other subscriptions via the sharing property
VM size per reservation Each capacity reservation covers exactly one VM size
Billing starts immediately You are charged for reserved capacity whether or not VMs are running against it

Association and Disassociation

See association-disassociation.md for how to associate and disassociate VMs/VMSS with a CRG.

Common CLI Commands

Action Command
List CRGs az capacity reservation group list
Show CRG az capacity reservation group show -g <rg> -n <crg> --instance-view
Delete CRG az capacity reservation group delete -g <rg> -n <crg>
List reservations az capacity reservation list -g <rg> --capacity-reservation-group <crg>
Update reservation quantity az capacity reservation update -g <rg> --capacity-reservation-group <crg> -n <res> --capacity <new-count>
Delete reservation az capacity reservation delete -g <rg> --capacity-reservation-group <crg> -n <res>

Finding Valid CRGs for a VM

To associate a VM with a CRG, the CRG must contain a capacity reservation that matches the VM's size, region, and zone (if zonal). While az capacity reservation group list can enumerate CRGs at the subscription level, filtering down to matching reservations across many groups is inefficient. Azure Resource Graph is recommended for cross-resource-group discovery.

Option 1: Azure Resource Graph (recommended)

ARG can query all capacity reservations across resource groups in a single call, filtering by location, VM size, and zone. This is the most efficient approach.

⚠️ Prerequisite: az extension add --name resource-graph

You must collapse this query to a single line before running it:

az graph query -q "
  Resources
  | where type =~ 'Microsoft.Compute/capacityReservationGroups/capacityReservations'
  | where location =~ '<region>'
  | where properties.provisioningState =~ 'Succeeded'
  | where sku.name =~ '<vm-size>'
  | project id,
            crgId = extract('(.*)/capacityReservations', 1, id),
            resourceGroup,
            zones,
            size = sku.name,
            capacity = coalesce(sku.capacity, 0),
            associationCount = coalesce(array_length(properties.virtualMachinesAssociated), 0),
            location
" --query "data[]" -o table

The crgId in the output is the parent Capacity Reservation Group resource ID — this is the value to use when associating a VM or VMSS.

To further narrow results for zonal VMs, add a zone filter:

| where zones has '<zone>'

Option 2: CLI enumeration

If ARG is unavailable, list CRGs per resource group and inspect their reservations:

# List all CRGs
az capacity reservation group list -o table

# List reservations within a CRG and check for matching size/capacity
az capacity reservation list \
  -g <rg> \
  --capacity-reservation-group <crg-name> \
  --query "[?sku.name=='<vm-size>'].{name:name, size:sku.name, capacity:sku.capacity, zones:zones}" \
  -o table

Estimating Reservation Cost

Capacity reservations are billed at the same pay-as-you-go rate as the underlying VM size, whether or not VMs are running against them. Use the Retail Prices API guide (unauthenticated) to look up hourly rates.

Estimated monthly cost: quantity × hourly rate × 730

⚠️ Prices returned are estimates based on current retail pay-as-you-go rates, not a final cost or contractual commitment. Actual charges may vary due to taxes, discounts (Reserved Instances, Savings Plans), or price changes.

Important Notes

  • Deletion is blocked until prerequisites are met: Azure rejects a CRG delete unless all VMs/VMSS are disassociated and all capacity reservations are deleted. Order: disassociate VMs/VMSS → delete reservations → delete group.
  • Quota required: Capacity reservations consume vCPU quota just like running VMs.

Learn More

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides comprehensive workflows for managing Azure compute resources, including VM creation, recommendations, and capacity management. It incorporates solid security practices like secret scrubbing and restricted network rules, with minor considerations related to external data ingestion.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    1/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 9c4c115. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
metadata
{
  "author": "Microsoft",
  "version": "0.0.0-placeholder"
}
  • Infrastructure
  • azure
  • vm
  • virtual-machines
  • vmss
  • provisioning
  • troubleshooting
  • capacity-reservation
  • pricing

README badge

README badge for microsoft/github-copilot-for-azure/azure-compute

Routes Azure VM and Virtual Machine Scale Set requests to five specialized workflows: VM recommendation and pricing, VM creation and provisioning, troubleshooting connectivity issues, capacity reservation, and machine enrollment. Use this skill when a user needs to size/compare VMs, deploy bare infrastructure, fix RDP/SSH access, or manage capacity reservations on Azure.

Generated from the current SKILL.md.

Does this skill handle application deployments like Docker or web apps?
No. This skill routes bare VM and VMSS infrastructure requests only. For deploying applications (Docker services, web apps, APIs, serverless workloads), use the azure-prepare skill instead.
What VM connectivity issues does this skill cover?
It covers RDP/SSH connection failures, port refused errors, black screen issues, and password resets. Use the VM Troubleshooter workflow when a user can't connect to an existing VM.
Can this skill help me choose the right VM size and pricing?
Yes. The VM Recommender workflow recommends VM sizes, compares options, and estimates costs based on workload requirements (web, backend, GPU, HPC, dev/test, etc.).
Does this skill support Capacity Reservation Groups?
Yes. It includes a dedicated workflow for creating, associating, and disassociating Capacity Reservation Groups to guarantee and pre-provision VM capacity.

Generated from the current SKILL.md. These answers refresh after source changes.