Skip to content

Commit d4bfe32

Browse files
Merge pull request #267001 from maulikshah23/patch-30
Update virtual-machine-scale-sets-automatic-upgrade.md
2 parents 5a5a854 + 2876d70 commit d4bfe32

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-upgrade.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,26 @@ PUT or PATCH on `/subscriptions/subscription_id/resourceGroups/myResourceGroup/p
201201
```
202202

203203
### Azure PowerShell
204-
Use the [Update-AzVmss](/powershell/module/az.compute/update-azvmss) cmdlet to configure automatic OS image upgrades for your scale set. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
204+
Use the [New-AzVmss](/powershell/module/az.compute//new-azvmss) cmdlet to configure automatic OS image upgrades for your scale set during provisioning. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
205+
206+
```azurepowershell-interactive
207+
New-AzVmss -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -AutomaticOSUpgrade $true
208+
```
209+
210+
Use the [Update-AzVmss](/powershell/module/az.compute/update-azvmss) cmdlet to configure automatic OS image upgrades for your existing scale set. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
205211

206212
```azurepowershell-interactive
207213
Update-AzVmss -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -AutomaticOSUpgrade $true
208214
```
209215

210216
### Azure CLI 2.0
211-
Use [az vmss update](/cli/azure/vmss#az-vmss-update) to configure automatic OS image upgrades for your scale set. Use Azure CLI 2.0.47 or above. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
217+
Use [az vmss create](/cli/azure/vmss?view=azure-cli-latest#az-vmss-create) to configure automatic OS image upgrades for your scale set during provisioning. Use Azure CLI 2.0.47 or above. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
218+
219+
```azurecli-interactive
220+
az vmss create --name myScaleSet --resource-group myResourceGroup --set UpgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade=true
221+
```
222+
223+
Use [az vmss update](/cli/azure/vmss#az-vmss-update) to configure automatic OS image upgrades for your existing scale set. Use Azure CLI 2.0.47 or above. The following example configures automatic upgrades for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
212224

213225
```azurecli-interactive
214226
az vmss update --name myScaleSet --resource-group myResourceGroup --set UpgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade=true
@@ -456,6 +468,10 @@ The platform can return errors on VMs while performing Automatic Image Upgrade w
456468
- Error is triggered when an unhandled, unformatted or unexpected occurs during execution.
457469
- The detailed error message displays the cause of the error.
458470

471+
**RollingUpgradeTimeoutError**
472+
- Error is triggered when the rolling upgrade process has timed out.
473+
- The detailed error message displays the length of time the system timed out after attempting to update.
474+
459475
## Next steps
460476
> [!div class="nextstepaction"]
461477
> [Learn about the Application Health Extension](../virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension.md)

0 commit comments

Comments
 (0)