Automatic Extension Upgrade for VMs and Scale Sets in Azure - Azure Virtual Machines (2024)

  • Article

Automatic Extension Upgrade is available for Azure VMs and Azure Virtual Machine Scale Sets. When Automatic Extension Upgrade is enabled on a virtual machine or scale set, the extension is upgraded automatically whenever the extension publisher releases a new version for that extension.

Automatic Extension Upgrade has the following features:

  • Supported for Azure VMs and Azure Virtual Machine Scale Sets.
  • Upgrades are applied in an availability-first deployment model.
  • For a Virtual Machine Scale Set, no more than 20% of the scale set virtual machines upgrades in a single batch. The minimum batch size is one virtual machine.
  • Works for all VM sizes, and for both Windows and Linux extensions.
  • You can opt out of automatic upgrades at any time.
  • Automatic extension upgrade can be enabled on a Virtual Machine Scale Sets of any size.
  • Each supported extension is enrolled individually, and you can choose which extensions to upgrade automatically.
  • Supported in all public cloud regions.

How does Automatic Extension Upgrade work?

The extension upgrade process replaces the existing extension version on a VM with a new version of the same extension when published by the extension publisher. The health of the VM is monitored after the new extension is installed. If the VM isn't in a healthy state within 5 minutes of the upgrade completion, the extension version is rolled back to the previous version.

A failed extension upgrade is automatically retried. A retry is attempted every few days automatically without user intervention.

Availability-first Updates

The availability-first model for platform orchestrated upgrades ensures that availability configurations in Azure are respected across multiple availability levels.

For a group of virtual machines undergoing an upgrade, the Azure platform orchestrates upgrades:

Across regions:

  • An upgrade moves across Azure globally in a phased manner to prevent Azure-wide deployment failures.
  • A 'phase' can have one or more regions, and an upgrade moves across phases only if eligible VMs in the previous phase upgrade successfully.
  • Geo-paired regions aren't upgraded concurrently and can't be in the same regional phase.
  • The success of an upgrade is measured by tracking the health of a VM post upgrade. VM health is tracked through platform health indicators for the VM. For Virtual Machine Scale Sets, the VM health is tracked through application health probes or the Application Health extension, if applied to the scale set.

Within a region:

  • VMs in different Availability Zones aren't upgraded concurrently with the same upgrade.
  • Single VMs that aren't part of an availability set are batched on a best effort basis to avoid concurrent upgrades for all VMs in a subscription.

Within a 'set':

  • All VMs in a common availability set or scale set aren't upgraded concurrently.
  • VMs in a common availability set are upgraded within Update Domain boundaries and VMs across multiple Update Domains aren't upgraded concurrently.
  • VMs in a common virtual machine scale set are grouped in batches and upgraded within Update Domain boundaries. Upgrade policies defined on the scale set are honored during the upgrade. Each group is upgraded using rolling upgrade strategy.

Upgrade process for Virtual Machine Scale Sets

  1. Before the upgrade process starts, the orchestrator ensures that no more than 20% of VMs in the entire scale set are unhealthy (for any reason).

  2. The upgrade orchestrator identifies the batch of VM instances to upgrade. An upgrade batch can have a maximum of 20% of the total VM count, subject to a minimum batch size of one virtual machine. Definition of Upgrade Policy and Availability Zones is considered while identifying the batch.

  3. After the upgrade, the VM health is always monitored before moving to the next batch. For scale sets with configured application health probes or Application Health extension, application health is also monitored. The upgrade waits up to 5 minutes (or the defined health probe configuration) for the VM to become healthy before upgrading the next batch. If a VM doesn't recover its health after an upgrade, then by default the previous extension version on the VM is reinstalled.

  4. The upgrade orchestrator also tracks the percentage of VMs that become unhealthy after an upgrade. The upgrade stops if more than 20% of upgraded instances become unhealthy during the upgrade process.

This process continues until all instances in the scale set are upgraded.

The scale set upgrade orchestrator checks for the overall scale set health before upgrading every batch. During a batch upgrade, there could be other concurrent planned or unplanned maintenance activities that could impact the health of your scale set virtual machines. In such cases, if more than 20% of the scale set's instances become unhealthy, then the scale set upgrade stops at the end of current batch.

Supported extensions

Automatic Extension Upgrade supports the following extensions (and more are added periodically):

  • Azure Automation Hybrid Worker extension - Linux and Windows
  • Dependency Agent – Linux and Windows
  • Application Health Extension – Linux and Windows
  • Guest Attestation Extension - Linux and Windows
  • Guest Configuration Extension – Linux and Windows
  • Key Vault – Linux and Windows
  • Azure Monitor Agent
  • Log Analytics Agent for Linux
  • Azure Diagnostics extension for Linux
  • Service Fabric – Linux

Enabling Automatic Extension Upgrade

To enable Automatic Extension Upgrade for an extension, you must ensure the property enableAutomaticUpgrade is set to true and added to every extension definition individually.

Using Azure portal

You can use Azure portal - Extension blade to enable automatic upgrade of extensions on existing Virtual Machines and Virtual Machine Scale Sets.

  1. Navigate to Virtual Machines or Virtual Machines Scale Sets blade and select the resource by clicking on its name.
  2. Navigate to "Extenisons + applications" blade under Settings which shows all extensions installed on the resource. The "Automatic Upgrade Status" column tells if Automatic upgrade of the extension is enabled, disabled or not-supported.
  3. Navigate to Extension details blade by clicking on the extension name.
  4. Click "Enable automatic upgrade" to enable automatic upgrade of the extension. This button can also be used to disable automatic upgrade when required.
    Automatic Extension Upgrade for VMs and Scale Sets in Azure - Azure Virtual Machines (2)

For Virtual Machines

  • REST API
  • PowerShell
  • CLI
  • Template

To enable automatic extension upgrade for an extension (in this example the Dependency Agent extension) on an Azure VM, use the following call:

PUT on `/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/extensions/<extensionName>?api-version=2019-12-01`
{        "name": "extensionName",    "type": "Microsoft.Compute/virtualMachines/extensions",    "location": "<location>",    "properties": {     "autoUpgradeMinorVersion": true,     "enableAutomaticUpgrade": true,      "publisher": "Microsoft.Azure.Monitoring.DependencyAgent",     "type": "DependencyAgentWindows",     "typeHandlerVersion": "9.5"     }}

For Virtual Machine Scale Sets

  • REST API
  • PowerShell
  • CLI
  • Template
PUT on `/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachineScaleSets/<vmssName>?api-version=2019-12-01`
{   "location": "<location>",   "properties": {    "virtualMachineProfile": { "extensionProfile": {        "extensions": [            { "name": "<extensionName>",             "properties": {              "autoUpgradeMinorVersion": true,              "enableAutomaticUpgrade": true,               "publisher": "Microsoft.Azure.Monitoring.DependencyAgent",               "type": "DependencyAgentWindows",               "typeHandlerVersion": "9.5"            }           }         ]     }    }    }}

Note

These operations sets the "enableAutomaticUpgrade" property to true on the VMSS resource but not on the underlying VMs.If the VMSS defines automatic or rolling upgrade mode in the upgradeProfile, then VMSS automatically propagates the change to each underlying VM.If the VMSS defines manual mode in the upgradePofile, then you also need to manually update each instance and propagate the change to each underlying VM.

Extension upgrades with multiple extensions

A VM or Virtual Machine Scale Set can have multiple extensions with automatic extension upgrade enabled. The same VM or scale set can also have other extensions without automatic extension upgrade enabled.

If multiple extension upgrades are available for a virtual machine, the upgrades may be batched together, but each extension upgrade is applied individually on a virtual machine. A failure on one extension doesn't impact the other extensions that may be upgrading. For example, if two extensions are scheduled for an upgrade, and the first extension upgrade fails, the second extension is still be upgraded.

Automatic Extension Upgrades can also be applied when a VM or virtual machine scale set has multiple extensions configured with extension sequencing. Extension sequencing is applicable for the first-time deployment of the VM, and any future extension upgrades on an extension are applied independently.

Difference between enableAutomaticUpgrade and autoUpgradeMinorVersion

  1. AutoUpgradeMinorVersion:

    • This property is used during VM creation and while upgrading the VM with a new configuration.
    • When set to “true,” it ensures that the latest minor version of the extension is automatically installed on the virtual machine.
    • It overrides the TypeHandlerVersion with the latest stable minor version available.
    • While upgrading the VM configuration, if a new minor version is available, then it's considered a configuration change and the extension is reinstalled with latest minor version.
    • This helps keep newly created VMs up-to-date with the latest stable minor extension version.
    • If you want to manually set the extension to a specific version, set this property to “false.”
  2. EnableAutomaticUpgrade:

    • This property affects existing virtual machines.
    • It does not impact the version installed during VM creation.
    • After VM creation, if the VM is not running the latest minor version of the extension, enabling this property triggers an automatic upgrade.
    • Upgrades do not cause VM reboot, are rolled out in a safe rolling manner and failed upgrades are rolled back immediately to provide high service availability and reliability.
    • It ensures that existing VMs stay secure and up-to-date by automatically updating them to the latest minor version.

It is recommended to enable both properties to keep all VMs secure and up-to-date.

Upgrades to major extension versions are never performed automatically by either properties since major versions can include breaking changes. You must manually set the TypeHandlerVersion to a major version and manually upgrade each existing VM to the latest major version.

Next steps

Learn about the Application Health Extension

Automatic Extension Upgrade for VMs and Scale Sets in Azure - Azure Virtual Machines (2024)

FAQs

Can an Azure virtual machine scale set automatically increase? ›

Azure Virtual Machine Scale Sets let you create and manage a group of load balanced VMs. The number of VM instances can automatically increase or decrease in response to demand or a defined schedule.

What extension should be enabled for Azure scale sets to auto scale based on in guest virtual machine metrics? ›

In-guest VM metrics with the Azure diagnostics extension

You can create autoscale rules based on a more detailed awareness of the VM performance, not just the percentage of CPU usage or memory consumption.

How do I enable automatic upgrade of Azure extension? ›

Using Azure portal

The "Automatic Upgrade Status" column tells if Automatic upgrade of the extension is enabled, disabled or not-supported. Navigate to Extension details blade by clicking on the extension name. Click "Enable automatic upgrade" to enable automatic upgrade of the extension.

How to enable automatic updates in Azure VM? ›

Enable the feature for deployment
  1. In the Azure portal, select Virtual machines or search for and select Virtual machines from the Home page.
  2. Select the VM for which you want to enable Update Management. ...
  3. On the VM page, under Operations, select Guest + host updates.
  4. You must have the Microsoft.

Does Azure automatically scale? ›

Azure Autoscaling lets you set up automated processes that scale your virtual machines (VMs). You do this by creating an Azure VM scale set, which defines how VMs are increased and decreased.

Can the machines in the scale set scale up automatically based on demand? ›

When you create a scale set, you define the number of VM instances that you wish to run. As your application demand changes, you can automatically increase or decrease the number of VM instances.

Which of the following are the options for auto scaling in Azure? ›

Supported services for autoscale
ServiceSchema and documentation
Azure Stream AnalyticsAutoscale streaming units (preview)
Azure SignalR Service (Premium tier)Automatically scale units of an Azure SignalR service
Azure Machine Learning workspaceAutoscale an online endpoint
Azure Spring AppsSet up autoscale for applications
6 more rows
Apr 15, 2024

What two forms of auto scaling can you use to automatically scale elastic compute cloud EC2 services? ›

After a scaling plan is created, Auto Scaling executes it by combining dynamic scaling and predictive scaling methods:
  • Dynamic scaling adapts capacity to actual loads to optimize resource utilization.
  • Predictive scaling creates a forecast of future loads and performs scaling actions to meet expected load.

What must be configured to enable an autoscaling group to scale automatically? ›

When you create an Auto Scaling group, you must specify the necessary information to configure the Amazon EC2 instances, the Availability Zones and VPC subnets for the instances, the desired capacity, and the minimum and maximum capacity limits.

How do I update my Azure VM extension? ›

Install and use extensions
  1. From the Extensions + Applications for the VM, on the Extensions tab, select + Add.
  2. Locate the Custom Script Extension option. Select the extension option, then select Next.
Aug 22, 2024

Can you upgrade Azure VM? ›

The in-place upgrade process requires the use of Managed Disks on the VM to be upgraded. Most VMs in Azure are using Managed Disks, and retirement for unmanaged disks support was announced in November of 2022. If the VM is currently using unmanaged disks, then follow these steps to migrate to Managed Disks.

Can Azure Virtual machines be configured to receive automatic security updates? ›

If automatic VM guest patching is enabled on a VM, then the available Critical and Security patches are downloaded and applied automatically on the VM. This process kicks off automatically every month when new patches are released.

How do I turn on auto scaling in Azure VM? ›

Create your first autoscale setting
  1. Open the Autoscale pane in Azure Monitor and select a resource that you want to scale. ...
  2. The current instance count is 1. ...
  3. Enter a Name and Resource group or use the default.
  4. Select Scale based on a metric.
  5. Select Add a rule. to open a context pane on the right side.

How do I enable Azure Automation Update Management? ›

From your Automation account select Update management under Update management. Select + Add Azure VMs and select one or more VMs from the list. Virtual machines that can't be enabled are grayed out and unable to be selected. Azure VMs can exist in any region no matter the location of your Automation account.

How do I enable automatic tuning in Azure? ›

To enable automatic tuning on a server in Azure SQL Database, navigate to the server in the Azure portal and then select Automatic tuning in the menu. Select the automatic tuning options you want to enable and select Apply. Automatic tuning options on a server are applied to all databases on this server.

How do I set up automatic Azure virtual desktop scaling? ›

Create a scaling plan
  1. Sign in to the Azure portal.
  2. In the search bar, type Azure Virtual Desktop and select the matching service entry.
  3. Select Scaling Plans, then select Create.
  4. In the Basics tab, look under Project details and select the name of the subscription you'll assign the scaling plan to.
Apr 24, 2024

Do Azure functions automatically scale? ›

Scales automatically, even during periods of high load. Automatically scales based on demand using prewarmed workers, which run applications with no delay after being idle, runs on more powerful instances, and connects to virtual networks.

How do I autoscale VMSS settings? ›

In the VMSS settings, navigate to the Scaling section. Select a Manual or Custom scaling policy based on the requirements. For automatic scaling, define scaling rules: Scale-out rules: Set conditions for scaling out, such as CPU usage exceeding a threshold.

What is auto scaling in VM? ›

Autoscaling is a feature of managed instance groups (MIGs). A managed instance group is a collection of virtual machine (VM) instances that are created from a common instance template. An autoscaler adds or deletes instances from a managed instance group based on the group's autoscaling policy.

Top Articles
5 Tips to a Tidy Pantry – KonMari | The Official Website of Marie Kondo
How Fast Do Helicopters Fly
Ffxiv Act Plugin
neither of the twins was arrested,传说中的800句记7000词
Inducement Small Bribe
Identifont Upload
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Txtvrfy Sheridan Wy
Die Windows GDI+ (Teil 1)
Buckaroo Blog
Our History | Lilly Grove Missionary Baptist Church - Houston, TX
True Statement About A Crown Dependency Crossword
Espn Expert Picks Week 2
Premier Boating Center Conroe
What’s the Difference Between Cash Flow and Profit?
Lima Crime Stoppers
Driving Directions To Atlanta
Lax Arrivals Volaris
7440 Dean Martin Dr Suite 204 Directions
7 Fly Traps For Effective Pest Control
Craigslist Panama City Fl
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Forum Phun Extra
My Homework Lesson 11 Volume Of Composite Figures Answer Key
Site : Storagealamogordo.com Easy Call
Lista trofeów | Jedi Upadły Zakon / Fallen Order - Star Wars Jedi Fallen Order - poradnik do gry | GRYOnline.pl
Sef2 Lewis Structure
Exl8000 Generator Battery
Accuweather Minneapolis Radar
Lcsc Skyward
Meggen Nut
Bj's Tires Near Me
Does Royal Honey Work For Erectile Dysfunction - SCOBES-AR
Gus Floribama Shore Drugs
Xfinity Outage Map Lacey Wa
Spy School Secrets - Canada's History
Los Amigos Taquería Kalona Menu
new haven free stuff - craigslist
Bt33Nhn
Case Funeral Home Obituaries
Jail View Sumter
Spectrum Outage in Genoa City, Wisconsin
How Does The Common App Work? A Guide To The Common App
Go Bananas Wareham Ma
Rocky Bfb Asset
Lucyave Boutique Reviews
Walmart 24 Hrs Pharmacy
Borat: An Iconic Character Who Became More than Just a Film
Headlining Hip Hopper Crossword Clue
Diario Las Americas Rentas Hialeah
Compete My Workforce
Latest Posts
Article information

Author: Sen. Ignacio Ratke

Last Updated:

Views: 5815

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Sen. Ignacio Ratke

Birthday: 1999-05-27

Address: Apt. 171 8116 Bailey Via, Roberthaven, GA 58289

Phone: +2585395768220

Job: Lead Liaison

Hobby: Lockpicking, LARPing, Lego building, Lapidary, Macrame, Book restoration, Bodybuilding

Introduction: My name is Sen. Ignacio Ratke, I am a adventurous, zealous, outstanding, agreeable, precious, excited, gifted person who loves writing and wants to share my knowledge and understanding with you.