Configure the upgrade policy mode for Virtual Machine Scale Sets
By: Date: 30/11/2024 Categories: azure Tags:

The upgrade policy mode you select can affect the overall service uptime of your Virtual Machine Scale Set. The available upgrade policy modes are automatic, manual, and rolling.

The upgrade policy mode can be defined during the scale set formation process or adjusted after deployment. If you do not specifically specify the upgrade policy mode, it defaults to manual.

In the Azure portal

Under the Management tab of the Azure portal, during the Virtual Machine Scale Set setup, select Rolling, Automatic, or Manual for the upgrade policy.

Using Azure CLI

When creating a new scale set using Azure CLI, use az vmss create and the -upgrade-policy-mode to set the upgrade policy mode.

az group create --name myResourceGroup --location southeastasia
az vmss create --resource-group myResourceGroup --name myScaleSet --orchestration-mode Flexible --image Ubuntu2204 --lb myLoadBalancer --upgrade-policy-mode manual --instance-count 5 --admin-username azureuser --generate-ssh-keys

Ref- Upgrade policy modes for Virtual Machine Scale Sets