Set the upgrade policy mode on Virtual Machine Scale Sets
Article 11/19/2024
2 contributors
Feedback
In this article
The upgrade policy mode can be set during scale set creation or changed post deployment. If you don't explicitly set the upgrade policy mode, it defaults to manual. To change the upgrade policy mode of an existing scale set deployment, see changing the upgrade policy mode .
During the Virtual Machine Scale Set creation in the Azure portal, under the Management tab, set the upgrade policy to Rolling , Automatic , or Manual .
If using a rolling upgrade policy mode, see configure rolling upgrade policy mode for configuration settings and suggestions.
When creating a new scale set using Azure CLI, use az vmss create and the -upgrade-policy-mode
to set the upgrade policy mode.
If using a rolling upgrade policy mode, see configure rolling upgrade policy for configuration settings and suggestions.
az group create --name myResourceGroup --location westus
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
When creating a new scale set using Azure PowerShell, use New-AzVmss and the -UpgradePolicyMode
parameter to set the upgrade policy mode.
If using a rolling upgrade policy mode, see configure rolling upgrade policy for configuration settings and suggestions.
New-AzResourceGroup -Name "myResourceGroup" -Location "WestUS"
New-AzVmss `
-ResourceGroupName "myResourceGroup" `
-Location "EastUS" `
-VMScaleSetName "myScaleSet" `
-OrchestrationMode "Flexible" `
-VirtualNetworkName "myVnet" `
-SubnetName "mySubnet" `
-PublicIpAddressName "myPublicIPAddress" `
-LoadBalancerName "myLoadBalancer" `
-UpgradePolicyMode "Manual"
When using an ARM template, add the upgradePolicy
parameter to the properties section of your template to set the upgrade policy mode.
If using a rolling upgrade policy mode, see configure rolling upgrade policy for configuration settings and suggestions.
"properties": {
"upgradePolicy": {
"mode": "manual",
}
}
Learn how to change the upgrade policy mode of your Virtual Machine Scale Set.