You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/capacity-reservation-create.md
+45-5Lines changed: 45 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,46 @@ The Capacity Reservation must meet the following rules:
33
33
- 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.
34
34
35
35
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
+
36
76
## Create a Capacity Reservation
37
77
38
78
### [API](#tab/api1)
@@ -89,7 +129,7 @@ The Capacity Reservation must meet the following rules:
89
129
The above request creates a reservation in the East US location for 5 quantities of the D2s_v3 VM size.
90
130
91
131
92
-
### [Portal](#tab/portal1)
132
+
### [Portal](#tab/portal2)
93
133
94
134
<!-- no images necessary if steps are straightforward -->
95
135
@@ -114,7 +154,7 @@ The Capacity Reservation must meet the following rules:
114
154
1. Select **Create**
115
155
116
156
117
-
### [CLI](#tab/cli1)
157
+
### [CLI](#tab/cli2)
118
158
119
159
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.
120
160
@@ -147,7 +187,7 @@ The Capacity Reservation must meet the following rules:
147
187
--zone 1
148
188
```
149
189
150
-
### [PowerShell](#tab/powershell1)
190
+
### [PowerShell](#tab/powershell2)
151
191
152
192
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.
0 commit comments