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
>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).
188
188
189
+
### ARM templates
190
+
The following example describes how to set automatic OS upgrades on a scale set model via Azure Resource Manager templates (ARM templates):
191
+
192
+
```json
193
+
"properties": {
194
+
"upgradePolicy": {
195
+
"mode": "Automatic",
196
+
"RollingUpgradePolicy": {
197
+
"BatchInstancePercent": 20,
198
+
"MaxUnhealthyInstancePercent": 25,
199
+
"MaxUnhealthyUpgradedInstancePercent": 25,
200
+
"PauseTimeBetweenBatches": "PT0S"
201
+
"automaticOSUpgradePolicy": {
202
+
"enableAutomaticOSUpgrade": true,
203
+
"useRollingUpgradePolicy": true,
204
+
"disableAutomaticRollback": false
205
+
}
206
+
}
207
+
"imagePublisher": {
208
+
"type": "string",
209
+
"defaultValue": "MicrosoftWindowsServer"
210
+
},
211
+
"imageOffer": {
212
+
"type": "string",
213
+
"defaultValue": "WindowsServer"
214
+
},
215
+
"imageSku": {
216
+
"type": "string",
217
+
"defaultValue": "2022-datacenter"
218
+
},
219
+
"imageOSVersion": {
220
+
"type": "string",
221
+
"defaultValue": "latest"
222
+
}
223
+
}
224
+
```
225
+
226
+
### Bicep
227
+
The following example describes how to set automatic OS upgrades on a scale set model via Bicep:
228
+
229
+
```json
230
+
properties: {
231
+
overprovision: overProvision
232
+
upgradePolicy: {
233
+
mode: 'Automatic'
234
+
automaticOSUpgradePolicy: {
235
+
enableAutomaticOSUpgrade: true
236
+
}
237
+
}
238
+
```
239
+
189
240
## Using Application Health Probes
190
241
191
242
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