Skip to content

Commit 3af1180

Browse files
committed
Update VMSS instance mix docs with new examples and notes
Enhanced documentation for creating, updating, and viewing Virtual Machine Scale Sets (VMSS) with instance mix. Updated CLI examples to use newer VM sizes and added authentication parameters. Clarified that updating VM sizes replaces the entire list, not just individual sizes. Added common update scenarios for adding and removing VM sizes, and included example output for viewing the skuProfile.
1 parent b30c3db commit 3af1180

File tree

3 files changed

+54
-4
lines changed

3 files changed

+54
-4
lines changed

articles/virtual-machine-scale-sets/instance-mix-create.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ az vmss create \
4848
--resource-group {myResourceGroup} \
4949
--image ubuntu2204 \
5050
--vm-sku Mix \
51-
--skuprofile-vmsizes Standard_DS1_v2 Standard_D2s_v4
51+
--skuprofile-vmsizes Standard_D2s_v5 Standard_D2as_v5 \
52+
--authentication-type ssh \
53+
--generate-ssh-keys
5254
```
5355

5456
To specify the allocation strategy, use the `--skuprofile-allocation-strategy` parameter, like the following command:
@@ -58,8 +60,10 @@ az vmss create \
5860
--resource-group {myResourceGroup} \
5961
--image ubuntu2204 \
6062
--vm-sku Mix \
61-
--skuprofile-vmsizes Standard_DS1_v2 Standard_D2s_v4 \
62-
--skuprofile-allocation-strategy CapacityOptimized
63+
--skuprofile-vmsizes Standard_D2s_v5 Standard_D2as_v5 \
64+
--skuprofile-allocation-strategy CapacityOptimized \
65+
--authentication-type ssh \
66+
--generate-ssh-keys
6367
```
6468

6569
### [Azure PowerShell](#tab/powershell-1)

articles/virtual-machine-scale-sets/instance-mix-update.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ az vmss update \
3737
#### Change the VM sizes
3838
To update the VM sizes in the `skuProfile`, for example, to Standard_D2as_v4, Standard_D2as_v5, and Standard_D2s_v5:
3939

40+
> [!NOTE]
41+
> When you update VM sizes, you must specify the complete list of sizes you want in the scale set. This operation replaces the entire list, not just adds or removes individual sizes.
42+
4043
```azurecli-interactive
4144
az vmss update \
4245
--resource-group {resourceGroupName} \
@@ -155,7 +158,7 @@ az vmss update \
155158
--resource-group {resourceGroupName} \
156159
--set sku.name=Mix sku.tier=null \
157160
--skuprofile-vmsizes Standard_D2as_v4 Standard_D2s_v5 Standard_D2as_v5 \
158-
--sku-allocat-strat capacityOptimized
161+
--set skuProfile.allocationStrategy=capacityOptimized
159162
```
160163

161164
### [REST API](#tab/arm-2)
@@ -188,5 +191,33 @@ In the request body, set `sku.name` to `"Mix"` and include the `skuProfile` with
188191

189192
---
190193

194+
## Common update scenarios
195+
196+
### Remove a specific VM size
197+
198+
To remove a specific VM size from the instance mix configuration, specify the complete list of VM sizes you want to keep, excluding the size you want to remove.
199+
200+
**Example**: Remove `Standard_D2as_v4` from a scale set that has `Standard_D2as_v4`, `Standard_D2s_v4`, `Standard_D2as_v5`, and `Standard_D2s_v5`:
201+
202+
```azurecli-interactive
203+
az vmss update \
204+
--resource-group {resourceGroupName} \
205+
--name {scaleSetName} \
206+
--skuprofile-vmsizes Standard_D2s_v4 Standard_D2as_v5 Standard_D2s_v5
207+
```
208+
209+
### Add a specific VM size
210+
211+
To add a new VM size to the instance mix configuration, specify the complete list of VM sizes including both existing and new sizes.
212+
213+
**Example**: Add `Standard_D4s_v5` to a scale set that currently has `Standard_D2s_v4`, `Standard_D2as_v5`, and `Standard_D2s_v5`:
214+
215+
```azurecli-interactive
216+
az vmss update \
217+
--resource-group {resourceGroupName} \
218+
--name {scaleSetName} \
219+
--skuprofile-vmsizes Standard_D2s_v4 Standard_D2as_v5 Standard_D2s_v5 Standard_D4s_v5
220+
```
221+
191222
## Next steps
192223
Learn how to [troubleshoot](instance-mix-faq-troubleshooting.md) your instance mix-enabled scale set.

articles/virtual-machine-scale-sets/instance-mix-view.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ To display all properties in the `skuProfile`, run:
3535
az vmss show --resource-group <resourceGroupName> --name <scaleSetName> --query "skuProfile"
3636
```
3737

38+
**Example output:**
39+
```json
40+
{
41+
"allocationStrategy": "CapacityOptimized",
42+
"vmSizes": [
43+
{
44+
"name": "Standard_D4s_v5"
45+
},
46+
{
47+
"name": "Standard_D4as_v5"
48+
}
49+
]
50+
}
51+
```
52+
3853
#### View VM sizes
3954
To display only the VM sizes, run:
4055
```azurecli-interactive

0 commit comments

Comments
 (0)