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-reservationreferencesassociation-disassociation.md

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

Associating and Disassociating VMs/VMSS with a Capacity Reservation Group

Association Model

Capacity Reservation Group (CRG)
├── Capacity Reservation: Standard_D4s_v5 × 5 (Zone 1)
├── Capacity Reservation: Standard_D4s_v5 × 3 (Zone 2)
└── Capacity Reservation: Standard_E8s_v5 × 2 (Zone 1)

VM / VMSS
└── capacityReservationGroup.id = <CRG resource ID>
    └── Azure auto-matches to a reservation with the right VM size + zone

Associating VMs

Set the capacityReservationGroup property when creating or updating a VM.

New VM
az vm create \
  -g <rg> \
  -n <vm-name> \
  --image <image> \
  --size Standard_D4s_v5 \
  --zone 1 \
  --capacity-reservation-group <crg-id>
Existing VM

Zonal VMs can be associated while running:

az vm update -g <rg> -n <vm-name> --capacity-reservation-group <crg-id>

Regional VMs (no zone) must be deallocated first:

az vm deallocate -g <rg> -n <vm-name>
az vm update -g <rg> -n <vm-name> --capacity-reservation-group <crg-id>
az vm start -g <rg> -n <vm-name>

Associating VMSS

az vmss create \
  -g <rg> \
  -n <vmss-name> \
  --image <image> \
  --vm-sku Standard_D4s_v5 \
  --instance-count 5 \
  --zones 1 \
  --capacity-reservation-group <crg-id>

Existing VMSS can be associated using az vmss update similarly to VMs. Regional VMSS must be deallocated first. Zonal VMSS can be associated without deallocating, but this is currently a Preview feature.

Disassociating from a Capacity Reservation Group

Both the VM/VMSS and the underlying capacity reservation logically occupy capacity. Azure imposes constraints to avoid ambiguous allocation states, so you cannot simply remove the association while resources are running against it.

There are three ways to disassociate. The commands below use az vm — for VMSS, substitute az vmss and add az vmss update-instances --instance-ids "*" as a final step when using a Manual upgrade policy.

Option 1: Deallocate, then remove association

Best when the VM/VMSS can tolerate downtime.

az vm deallocate -g <rg> -n <vm-name>
az vm update -g <rg> -n <vm-name> --capacity-reservation-group None
az vm start -g <rg> -n <vm-name>   # optional

Option 2: Set reserved quantity to zero, then remove association

Best when the VM/VMSS cannot be deallocated and the reservation is no longer needed.

az capacity reservation update \
  -g <rg> --capacity-reservation-group <crg> \
  -n <reservation-name> --capacity 0
az vm update -g <rg> -n <vm-name> --capacity-reservation-group None

Option 3: Delete the VM/VMSS

Deleting the resource automatically removes the association. Some latency may occur before the capacity reservation allocation state updates.

VMSS Upgrade Policy Behavior

Policy Behavior
Automatic Instances update automatically — no further action needed
Rolling Instances update in batches with an optional pause between them
Manual You must run az vmss update-instances --instance-ids "*" per update

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.