Skip to content

Commit 6295c27

Browse files
authored
Update virtual-machine-scale-sets-automatic-upgrade.md
Added steps for enabling auto os upgrades via ARM templates and Bicep.
1 parent fd5c5d2 commit 6295c27

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,34 @@ az vmss update --name myScaleSet --resource-group myResourceGroup --set UpgradeP
186186
> [!NOTE]
187187
>After configuring automatic OS image upgrades for your scale set, you must also bring the scale set VMs to the latest scale set model if your scale set uses the 'Manual' [upgrade policy](virtual-machine-scale-sets-upgrade-scale-set.md#how-to-bring-vms-up-to-date-with-the-latest-scale-set-model).
188188
189+
### ARM Templates
190+
The following example describes how to set automatic OS upgrades on a scale set model via ARM Templates:
191+
192+
```json
193+
"properties": {
194+
"upgradePolicy": {
195+
"mode": "Automatic",
196+
"automaticOSUpgradePolicy": {
197+
"enableAutomaticOSUpgrade": true
198+
}
199+
}
200+
}
201+
```
202+
203+
### Bicep
204+
The following example describes how to set automatic OS upgrades on a scale set model via Bicep:
205+
206+
```json
207+
properties: {
208+
    overprovision: overProvision
209+
    upgradePolicy: {
210+
      mode: 'Automatic'
211+
      automaticOSUpgradePolicy: {
212+
        enableAutomaticOSUpgrade: true
213+
      }
214+
    }
215+
```
216+
189217
## Using Application Health Probes
190218

191219
During an OS Upgrade, VM instances in a scale set are upgraded one batch at a time. The upgrade should continue only if the customer application is healthy on the upgraded VM instances. We recommend that the application provides health signals to the scale set OS Upgrade engine. By default, during OS Upgrades the platform considers VM power state and extension provisioning state to determine if a VM instance is healthy after an upgrade. During the OS Upgrade of a VM instance, the OS disk on a VM instance is replaced with a new disk based on latest image version. After the OS Upgrade has completed, the configured extensions are run on these VMs. The application is considered healthy only when all the extensions on the instance are successfully provisioned.

0 commit comments

Comments
 (0)