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-machine-scale-sets/virtual-machine-scale-sets-change-upgrade-policy.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,17 @@ If using a rolling upgrade policy, see [configure rolling upgrade policy](virtua
26
26
27
27
:::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.":::
28
28
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
+
```
29
40
30
41
### [PowerShell](#tab/powershell)
31
42
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.
Copy file name to clipboardExpand all lines: articles/virtual-machine-scale-sets/virtual-machine-scale-sets-configure-rolling-upgrades.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
author: mimckitt
5
5
ms.author: mimckitt
6
6
ms.topic: how-to
@@ -23,7 +23,7 @@ Rolling upgrade policy is best suited for production workloads.
23
23
24
24
- 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.
25
25
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).
27
27
28
28
>[!IMPORTANT]
29
29
> 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.
36
36
37
37
|Setting | Description |
38
38
|---|---|
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**. |
40
40
|**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. |
41
41
|**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. |
42
42
|**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.
56
56
57
57
:::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.":::
58
58
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
+
```
59
73
60
74
### [PowerShell](#tab/powershell1)
61
75
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
119
133
120
134
### [CLI](#tab/cli2)
121
135
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).
123
137
124
138
```azurecli
125
139
az vmss rolling-upgrade get-latest \
@@ -155,7 +169,7 @@ az vmss rolling-upgrade get-latest \
155
169
156
170
### [PowerShell](#tab/powershell2)
157
171
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).
159
173
160
174
```azurepowershell
161
175
Get-AzVMssRollingUpgrade `
@@ -210,12 +224,6 @@ You can stop a rolling upgrade in progress using [Stop-AzVmssRollingUpgrade](/po
210
224
Stop-AzVmssRollingUpgrade `
211
225
-ResourceGroupName myResourceGroup `
212
226
-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 :
219
227
```
220
228
---
221
229
@@ -224,7 +232,7 @@ Error :
224
232
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.
225
233
226
234
### [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).
228
236
229
237
```azurecli
230
238
az vmss update \
@@ -233,7 +241,7 @@ az vmss update \
233
241
```
234
242
235
243
### [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).
0 commit comments