Skip to content

Commit 79a1f54

Browse files
Merge pull request #274158 from mimckitt/patch-123
Update virtual-machine-scale-sets-configure-rolling-upgrades.md
2 parents 6ba0e42 + b66d900 commit 79a1f54

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-change-upgrade-policy.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ If using a rolling upgrade policy, see [configure rolling upgrade policy](virtua
2626

2727
:::image type="content" source="../virtual-machine-scale-sets/media/upgrade-policy/change-upgrade-policy.png" alt-text="Screenshot showing changing the upgrade policy and enabling MaxSurge in the Azure portal.":::
2828

29+
### [CLI](#tab/cli)
30+
Update an existing Virtual Machine Scale Set using [az vmss update](/cli/azure/vmss#az-vmss-update) and the `--set` parameter.
31+
32+
If using a rolling upgrade policy, see [configure rolling upgrade policy](virtual-machine-scale-sets-configure-rolling-upgrades.md) for more configuration options and suggestions.
33+
34+
```azurecli-interactive
35+
az vmss update \
36+
--name myScaleSet \
37+
--resource-group myResourceGroup \
38+
--set upgradePolicy.mode=manual
39+
```
2940

3041
### [PowerShell](#tab/powershell)
3142
Update an existing Virtual Machine Scale Set using [Update-AzVmss](/powershell/module/az.compute/update-azvmss) and the `-UpgradePolicyMode` to set the upgrade policy mode.

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-configure-rolling-upgrades.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Configure rolling upgrades on Virtual Machine Scale Sets
3-
description: Learn about how to configure rolling upgrades on Virtual Machine Scale Sets
3+
description: Learn about how to configure rolling upgrades on Virtual Machine Scale Sets.
44
author: mimckitt
55
ms.author: mimckitt
66
ms.topic: how-to
@@ -23,7 +23,7 @@ Rolling upgrade policy is best suited for production workloads.
2323

2424
- If using a rolling upgrade policy, the scale set must have a [health probe](../load-balancer/load-balancer-custom-probe-overview.md) or use the [Application Health Extension](virtual-machine-scale-sets-health-extension.md) to monitor application health.
2525

26-
- If using rolling upgrades with MaxSurge, new VMs are created using the latest scale set model to replace VMs using the old scale set model. These newly created VMs have new instance Ids and IP addresses. Ensure you have enough quota and address space in your subnet to accommodate these new VMs before enabling MaxSurge. For more information on quotas and limits, see [Azure subscription and service limits](../azure-resource-manager/management/azure-subscription-service-limits.md)
26+
- If using rolling upgrades with MaxSurge, new VMs are created using the latest scale set model to replace VMs using the old scale set model. These newly created VMs have new instance Ids and IP addresses. Ensure you have enough quota and address space in your subnet to accommodate these new VMs before enabling MaxSurge. For more information on quotas and limits, see [Azure subscription and service limits](../azure-resource-manager/management/azure-subscription-service-limits.md).
2727

2828
>[!IMPORTANT]
2929
> MaxSurge is currently in preview for Virtual Machine Scale Sets. To use this preview feature, register the provider feature using Azure Cloud Shell.
@@ -36,7 +36,7 @@ Rolling upgrade policy is best suited for production workloads.
3636

3737
|Setting | Description |
3838
|---|---|
39-
|**Upgrade Policy Mode** | The upgrade policy modes available on Virtual Machine Scale Sets are **Automatic**, **Manual** and **Rolling**. |
39+
|**Upgrade Policy Mode** | The upgrade policy modes available on Virtual Machine Scale Sets are **Automatic**, **Manual**, and **Rolling**. |
4040
|**Rolling upgrade batch size %** | Specifies how many of the total instances of your scale set you want to be upgraded at one time. <br><br>Example: A batch size of 20% when you have 10 instances in your scale set results in upgrade batches with two instances each. |
4141
|**Pause time between batches (sec)** | Specifies how long you want your scale set to wait between upgrading batches.<br><br> Example: A pause time of 10 seconds means that once a batch is successfully completed, the scale set will wait 10 seconds before moving onto the next batch. |
4242
|**Max unhealthy instance %** | Specifies the total number of instances allowed to be marked as unhealthy before and during the rolling upgrade. <br><br>Example: A max unhealthy instance % of 20 means if you have a scale set of 10 instances and more than two instances in the entire scale set report back as unhealthy, the rolling upgrade stops. |
@@ -56,6 +56,20 @@ Select the Virtual Machine Scale Set you want to change the upgrade policy for.
5656

5757
:::image type="content" source="../virtual-machine-scale-sets/media/upgrade-policy/rolling-upgrade-policy-portal.png" alt-text="Screenshot showing changing the upgrade policy and enabling MaxSurge in the Azure portal.":::
5858

59+
### [CLI](#tab/cli1)
60+
Update an existing Virtual Machine Scale Set using [az vmss update](/cli/azure/vmss#az-vmss-update).
61+
62+
```azurecli-interactive
63+
az vmss update \
64+
--name myScaleSet \
65+
--resource-group myResourceGroup \
66+
--max-batch-instance-percent 10 \
67+
--max-unhealthy-instance-percent 20 \
68+
--max-unhealthy-upgraded-instance-percent 20 \
69+
--prioritize-unhealthy-instances true \
70+
--pause-time-between-batches PT2S \
71+
--max-surge true
72+
```
5973

6074
### [PowerShell](#tab/powershell1)
6175
Update an existing Virtual Machine Scale Set using [Update-AzVmss](/powershell/module/az.compute/update-azvmss).
@@ -119,7 +133,7 @@ Additionally, you can view exactly what changes are being rolled out in the Acti
119133

120134
### [CLI](#tab/cli2)
121135

122-
You can get the status of a rolling upgrade in progress using [az vmss rolling-upgrade get-latest](/cli/azure/vmss#az-vmss-rolling-upgrade)
136+
You can get the status of a rolling upgrade in progress using [az vmss rolling-upgrade get-latest](/cli/azure/vmss#az-vmss-rolling-upgrade).
123137

124138
```azurecli
125139
az vmss rolling-upgrade get-latest \
@@ -155,7 +169,7 @@ az vmss rolling-upgrade get-latest \
155169

156170
### [PowerShell](#tab/powershell2)
157171

158-
You can get the status of a rolling upgrade in progress using [Get-AzVmssRollingUpgrade](/powershell/module/az.compute/get-azvmssrollingupgrade)
172+
You can get the status of a rolling upgrade in progress using [Get-AzVmssRollingUpgrade](/powershell/module/az.compute/get-azvmssrollingupgrade).
159173

160174
```azurepowershell
161175
Get-AzVMssRollingUpgrade `
@@ -210,12 +224,6 @@ You can stop a rolling upgrade in progress using [Stop-AzVmssRollingUpgrade](/po
210224
Stop-AzVmssRollingUpgrade `
211225
-ResourceGroupName myResourceGroup `
212226
-VMScaleSetName myScaleSet
213-
214-
Name : f78e1b14-720a-4c53-9656-79a43bd10adc
215-
StartTime : 1/12/2024 8:40:46 PM
216-
EndTime : 1/12/2024 8:45:18 PM
217-
Status : Succeeded
218-
Error :
219227
```
220228
---
221229

@@ -224,7 +232,7 @@ Error :
224232
If you decide to cancel a rolling upgrade or the upgrade has stopped due to any policy breach, any more changes that result in another scale set model change trigger a new rolling upgrade. If you want to restart a rolling upgrade, to trigger a generic model update. This tells the scale set to check if all the instances are up to date with the latest model.
225233

226234
### [CLI](#tab/cli4)
227-
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [az vmss update](/cli/azure/vmss#az-vmss-update)
235+
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [az vmss update](/cli/azure/vmss#az-vmss-update).
228236

229237
```azurecli
230238
az vmss update \
@@ -233,7 +241,7 @@ az vmss update \
233241
```
234242

235243
### [PowerShell](#tab/powershell4)
236-
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [Update-AzVmss](/powershell/module/az.compute/update-azvmss)
244+
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [Update-AzVmss](/powershell/module/az.compute/update-azvmss).
237245

238246
```azurepowershell
239247
$VMSS = Get-AzVmss -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet"

0 commit comments

Comments
 (0)