Skip to content

Commit 7bd12da

Browse files
authored
Update capacity-reservation-create.md
1 parent ef9628c commit 7bd12da

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ Before creating capacity reservation, VM sizes available for reservation can be
5555
1. Select **Next**
5656
1. On VM size, click on **See all sizes** to check what VM sizes are available for Capacity Reservation
5757

58+
### [CLI](#tab/cli1)
59+
60+
1. The following example lists the capacity reservation available VM sizes in East US location using Azure CLI:
5861

62+
```azurecli-interactive
63+
az vm list-skus -l eastus --resource-type virtualMachines --query "[?contains(capabilities[?name == 'CapacityReservationSupported' && value == 'True'].name,'CapacityReservationSupported')].name"
64+
```
5965
### [PowerShell](#tab/powershell1)
6066
6167
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:
@@ -66,15 +72,6 @@ Before creating capacity reservation, VM sizes available for reservation can be
6672
$vmsizes = Get-AzComputeResourceSku -Location eastus | where {$_.ResourceType -eq "virtualMachines"}
6773
foreach($vmsize in $vmsizes) { foreach($capability in $vmsize.capabilities) { if($capability.Name -eq 'CapacityReservationSupported' -and $capability.Value -eq 'true'){ $vmsize.name } } }
6874
```
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-
```
7875
---
7976
<!-- The three dashes above show that your section of tabbed content is complete. Do not remove them :) -->
8077

0 commit comments

Comments
 (0)