Skip to content

Commit ca8c4be

Browse files
Merge pull request #219402 from tferdou1/patch-3
Update capacity-reservation-create.md
2 parents 646f29d + 4f2e5a3 commit ca8c4be

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

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

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,46 @@ 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+
### [CLI](#tab/cli1)
59+
60+
Before you create a capacity reservation, you can check the reservation available VM sizes for the region selected. The following example lists the capacity reservation available VM sizes in East US location using Azure CLI:
61+
62+
```azurecli-interactive
63+
az vm list-skus -l eastus --resource-type virtualMachines --query "[?contains(capabilities[?name == 'CapacityReservationSupported' && value == 'True'].name,'CapacityReservationSupported')].name"
64+
```
65+
### [PowerShell](#tab/powershell1)
66+
67+
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:
68+
69+
```powershell-interactive
70+
$vmsizes = Get-AzComputeResourceSku -Location eastus | where {$_.ResourceType -eq "virtualMachines"}
71+
foreach($vmsize in $vmsizes) { foreach($capability in $vmsize.capabilities) { if($capability.Name -eq 'CapacityReservationSupported' -and $capability.Value -eq 'true'){ $vmsize.name } } }
72+
```
73+
---
74+
<!-- The three dashes above show that your section of tabbed content is complete. Do not remove them :) -->
75+
3676
## Create a Capacity Reservation
3777

3878
### [API](#tab/api1)
@@ -89,7 +129,7 @@ The Capacity Reservation must meet the following rules:
89129
The above request creates a reservation in the East US location for 5 quantities of the D2s_v3 VM size.
90130
91131
92-
### [Portal](#tab/portal1)
132+
### [Portal](#tab/portal2)
93133
94134
<!-- no images necessary if steps are straightforward -->
95135
@@ -114,7 +154,7 @@ The Capacity Reservation must meet the following rules:
114154
1. Select **Create**
115155
116156
117-
### [CLI](#tab/cli1)
157+
### [CLI](#tab/cli2)
118158
119159
1. Before you can create a Capacity Reservation, create a resource group with `az group create`. The following example creates a resource group *myResourceGroup* in the East US location.
120160
@@ -147,7 +187,7 @@ The Capacity Reservation must meet the following rules:
147187
--zone 1
148188
```
149189
150-
### [PowerShell](#tab/powershell1)
190+
### [PowerShell](#tab/powershell2)
151191
152192
1. Before you can create a Capacity Reservation, create a resource group with `New-AzResourceGroup`. The following example creates a resource group *myResourceGroup* in the East US location.
153193
@@ -231,7 +271,7 @@ https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{reso
231271
}
232272
```
233273

234-
### [CLI](#tab/cli2)
274+
### [CLI](#tab/cli3)
235275

236276
```azurecli-interactive
237277
az capacity reservation show
@@ -240,7 +280,7 @@ https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{reso
240280
-g myResourceGroup
241281
```
242282

243-
### [PowerShell](#tab/powershell2)
283+
### [PowerShell](#tab/powershell3)
244284

245285
Check on your Capacity Reservation:
246286

0 commit comments

Comments
 (0)