Skip to content

Commit 6441362

Browse files
Merge pull request #280326 from maulikshah23/patch-38
Update virtual-machine-scale-sets-automatic-upgrade.md
2 parents b64e0e5 + a682fbe commit 6441362

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

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

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.topic: conceptual
77
ms.service: virtual-machine-scale-sets
88
ms.subservice: automatic-os-upgrade
99
ms.custom: linux-related-content, devx-track-azurecli, devx-track-azurepowershell
10-
ms.date: 06/14/2024
10+
ms.date: 07/08/2024
1111
ms.reviewer: mimckitt
1212
---
1313
# Azure Virtual Machine Scale Set automatic OS image upgrades
@@ -283,7 +283,7 @@ properties: {
283283
}
284284
```
285285

286-
## Using Application Health Probes
286+
## Using Application Health Extension
287287

288288
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.
289289

@@ -313,17 +313,6 @@ The load-balancer probe can be referenced in the *networkProfile* of the scale s
313313
> [!NOTE]
314314
> When using Automatic OS Upgrades with Service Fabric, the new OS image is rolled out Update Domain by Update Domain to maintain high availability of the services running in Service Fabric. To utilize Automatic OS Upgrades in Service Fabric your cluster node type must be configured to use the Silver Durability Tier or higher. For Bronze Durability tier, automatic OS image upgrade is only supported for Stateless node types. For more information on the durability characteristics of Service Fabric clusters, please see [this documentation](../service-fabric/service-fabric-cluster-capacity.md#durability-characteristics-of-the-cluster).
315315
316-
### Keep credentials up to date
317-
318-
If your scale set uses any credentials to access external resources, such as a VM extension configured to use a SAS token for storage account, then ensure that the credentials are updated. If any credentials, including certificates and tokens, have expired, the upgrade will fail and the first batch of VMs will be left in a failed state.
319-
320-
The recommended steps to recover VMs and re-enable automatic OS upgrade if there's a resource authentication failure are:
321-
322-
* Regenerate the token (or any other credentials) passed into your extension(s).
323-
* Ensure that any credential used from inside the VM to talk to external entities is up to date.
324-
* Update extension(s) in the scale set model with any new tokens.
325-
* Deploy the updated scale set, which will update all VM instances including the failed ones.
326-
327316
## Using Application Health extension
328317

329318
The Application Health extension is deployed inside a Virtual Machine Scale Set instance and reports on VM health from inside the scale set instance. You can configure the extension to probe on an application endpoint and update the status of the application on that instance. This instance status is checked by Azure to determine whether an instance is eligible for upgrade operations.
@@ -338,6 +327,17 @@ There are multiple ways of deploying the Application Health extension to your sc
338327
## Get the history of automatic OS image upgrades
339328
You can check the history of the most recent OS upgrade performed on your scale set with Azure PowerShell, Azure CLI 2.0, or the REST APIs. You can get history for the last five OS upgrade attempts within the past two months.
340329

330+
### Keep credentials up to date
331+
332+
If your scale set uses any credentials to access external resources, such as a VM extension configured to use a SAS token for storage account, then ensure that the credentials are updated. If any credentials, including certificates and tokens, have expired, the upgrade will fail and the first batch of VMs will be left in a failed state.
333+
334+
The recommended steps to recover VMs and re-enable automatic OS upgrade if there's a resource authentication failure are:
335+
336+
* Regenerate the token (or any other credentials) passed into your extension(s).
337+
* Ensure that any credential used from inside the VM to talk to external entities is up to date.
338+
* Update extension(s) in the scale set model with any new tokens.
339+
* Deploy the updated scale set, which will update all VM instances including the failed ones.
340+
341341
### REST API
342342
The following example uses [REST API](/rest/api/compute/virtualmachinescalesets/getosupgradehistory) to check the status for the scale set named *myScaleSet* in the resource group named *myResourceGroup*:
343343

@@ -444,6 +444,36 @@ Use [az vmss rolling-upgrade start](/cli/azure/vmss/rolling-upgrade#az-vmss-roll
444444
az vmss rolling-upgrade start --resource-group "myResourceGroup" --name "myScaleSet" --subscription "subscriptionId"
445445
```
446446

447+
## Leverage Activity Logs for Upgrade Notifications and Insights
448+
449+
[Activity Log](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell) is a subscription log that provides insight into subscription-level events that have occurred in Azure. Customers are able to:
450+
* See events related to operations performed on their resources in Azure portal
451+
* Create action groups to tune notification methods like email, sms, webhooks, or ITSM
452+
* Set up suitable alerts using different criteria using Portal, ARM resource template, PowerShell or CLI to be sent to action groups
453+
454+
Customers will receive three types of notifications related to Automatic OS Upgrade operation:
455+
* Submission of upgrade request for a particular resource
456+
* Outcome of submission request along with any error details
457+
* Outcome of upgrade completion along with any error details
458+
459+
### Setting up Action Groups for Activity log alerts
460+
461+
An [action group](https://learn.microsoft.com/azure/azure-monitor/alerts/action-groups) is a collection of notification preferences defined by the owner of an Azure subscription. Azure Monitor and Service Health alerts use action groups to notify users that an alert has been triggered.
462+
463+
Action groups can be created and managed using:
464+
* [ARM Resource Manager](https://learn.microsoft.com/azure/azure-monitor/alerts/action-groups#create-an-action-group-with-a-resource-manager-template)
465+
* [Portal](https://learn.microsoft.com/azure/azure-monitor/alerts/action-groups#create-an-action-group-in-the-azure-portal)
466+
* PowerShell:
467+
* [New-AzActionGroup](https://learn.microsoft.com/powershell/module/az.monitor/new-azactiongroup?view=azps-12.0.0)
468+
* [Get-AzActionGroup](https://learn.microsoft.com/powershell/module/az.monitor/get-azactiongroup?view=azps-12.0.0)
469+
* [Remove-AzActionGroup](https://learn.microsoft.com/powershell/module/az.monitor/remove-azactiongroup?view=azps-12.0.0)
470+
* [CLI](https://learn.microsoft.com/cli/azure/monitor/action-group?view=azure-cli-latest#az-monitor-action-group-create)
471+
472+
Customers can set up the following using action groups:
473+
* [SMS and/or Email notifications](https://learn.microsoft.com/azure/azure-monitor/alerts/action-groups#email-azure-resource-manager)
474+
* [Webhooks](https://learn.microsoft.com/azure/azure-monitor/alerts/action-groups#webhook) - Customers can attach webhooks to their automation runbooks and configure their action groups to trigger the runbooks. You can start a runbook from a [webhook](https://docs.microsoft.com/azure/automation/automation-webhooks)
475+
* [ITSM Connections](https://learn.microsoft.com/azure/azure-monitor/alerts/itsmc-overview)
476+
447477
## Investigate and Resolve Auto Upgrade Errors
448478

449479
The platform can return errors on VMs while performing Automatic Image Upgrade with Rolling Upgrade policy. The [Get Instance View](/rest/api/compute/virtual-machine-scale-sets/get-instance-view) of a VM contains the detailed error message to investigate and resolve an error. The [Rolling Upgrades - Get Latest](/rest/api/compute/virtual-machine-scale-sets/get) can provide more details on rolling upgrade configuration and status. The [Get OS Upgrade History](/rest/api/compute/virtual-machine-scale-sets/get) provides details on the last image upgrade operation on the scale set. Below are the topmost errors that can result in Rolling Upgrades.

0 commit comments

Comments
 (0)