Skip to content

Commit 94b08f9

Browse files
authored
Update capacity-reservation-create.md
1 parent 62c9f5a commit 94b08f9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

articles/virtual-machines/capacity-reservation-create.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,51 @@ The Capacity Reservation must meet the following rules:
3333
- For a Capacity Reservation group that supports zones, each reservation type is defined by the combination of **VM size** and **zone**. For example, one Capacity Reservation for `Standard_D2s_v3` in `Zone 1`, another Capacity Reservation for `Standard_D2s_v3` in `Zone 2`, and a third Capacity Reservation for `Standard_D2s_v3` in `Zone 3` is supported.
3434

3535

36+
## Checking VM sizes available for Capacity Reservation in a region
37+
38+
Before creating capacity reservation, VM sizes available for reservation can be checked for a particular region.
39+
40+
41+
### [Portal](#tab/portal1)
42+
43+
<!-- no images necessary if steps are straightforward -->
44+
45+
1. Open [Azure portal](https://portal.azure.com)
46+
1. In the search bar, type **Capacity Reservation groups**
47+
1. Select **Capacity Reservation groups** from the options
48+
1. Select **Create**
49+
1. Under the *Basics* tab, create a Capacity Reservation group:
50+
1. Select a **Subscription**
51+
1. Select or create a **Resource group**
52+
1. **Name** your group
53+
1. Select a **Region**
54+
1. Optionally select **Availability zones** or opt not to specify any zones and allow Azure to choose for you
55+
1. Select **Next**
56+
1. On VM size, click on **See all sizes** to check what VM sizes are available for Capacity Reservation
57+
58+
59+
### [PowerShell](#tab/powershell1)
60+
61+
1. Before you create a capacity reservation, you can check the reservation available VM sizes for the region selected using Get-AzComputeResourceSku for Capability property for Resource type Virtual Machines. The following example lists the capacity reservation available VM sizes in East US location:
62+
63+
64+
65+
```powershell-interactive
66+
$vmsizes = Get-AzComputeResourceSku -Location eastus | where {$_.ResourceType -eq "virtualMachines"}
67+
foreach($vmsize in $vmsizes) { foreach($capability in $vmsize.capabilities) { if($capability.Name -eq 'CapacityReservationSupported' -and $capability.Value -eq 'true'){ $vmsize.name } } }
68+
```
69+
70+
71+
### [CLI](#tab/cli1)
72+
73+
1. The following example lists the capacity reservation available VM sizes in East US location using Azure CLI:
74+
75+
```azurecli-interactive
76+
az vm list-skus -l eastus --resource-type virtualMachines --query "[?contains(capabilities[?name == 'CapacityReservationSupported' && value == 'True'].name,'CapacityReservationSupported')].name"
77+
```
78+
---
79+
<!-- The three dashes above show that your section of tabbed content is complete. Do not remove them :) -->
80+
3681
## Create a Capacity Reservation
3782
3883
### [API](#tab/api1)

0 commit comments

Comments
 (0)