Automatic extension upgrades are now enabled by default on Azure Arc-enabled servers

Published Apr 25 2022 12:20 PM 1,218 Views
Microsoft

We are making automatic extension upgrades for Azure Arc-enabled servers even more automatic! Now, when you deploy an extension to your server, automatic extension upgrades will be enabled by default to help keep your extensions up to date with the latest security and feature improvements. You don't need to do anything to take advantage of this change -- all your existing ARM templates, Azure Policies, and deployment scripts will honor the new default. Extensions that are already installed on your servers will remain unchanged and retain their current automatic upgrade preference.

 

The fastest way to find out which of your Azure Arc-enabled server extensions have automatic upgrades enabled is to use Azure Resource Graph:

 

resources
| where type =~ "microsoft.hybridcompute/machines/extensions"
| project id, publisher = properties.publisher, type = properties.type, automaticUpgradesEnabled = properties.enableAutomaticUpgrade

 

Try this query in your own subscription

 

If you need to prevent an extension from automatically upgrading on a server (for example, if it has strict change windows and can only be updated at certain times), you can opt out of this behavior when deploying the extension by setting the enableAutomaticUpgrade property in your ARM template, PowerShell, or CLI command to false. You can also update the setting anytime after the extension is deployed by modifying the extension. The below PowerShell command shows how to disable automatic extension upgrades for an Azure Log Analytics Agent extension on a Linux server:

 

Set-AzConnectedMachineExtension -MachineName "ArcServerName" -Name "ExtensionName" -ResourceGroupName "MyRG" -Location "ArcServerLocation" -Publisher "Microsoft.EnterpriseCloud.Monitoring" -ExtensionType "OmsAgentForLinux" -EnableAutomaticUpgrade:$false

 

We're also working on a portal experience to let you manage automatic extension upgrade preferences in the browser and an Azure policy that will let you audit and enforce this setting across an entire resource group, subscription, or management group. Stay tuned for these new features!

 

Ryan on behalf of the Azure Arc-enabled servers team

%3CLINGO-SUB%20id%3D%22lingo-sub-3292405%22%20slang%3D%22en-US%22%3EAutomatic%20extension%20upgrades%20are%20now%20enabled%20by%20default%20on%20Azure%20Arc-enabled%20servers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3292405%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20making%20automatic%20extension%20upgrades%20for%20Azure%20Arc-enabled%20servers%20even%20more%20automatic!%20Now%2C%20when%20you%20deploy%20an%20extension%20to%20your%20server%2C%20automatic%20extension%20upgrades%20will%20be%20enabled%20by%20default%20to%20help%20keep%20your%20extensions%20up%20to%20date%20with%20the%20latest%20security%20and%20feature%20improvements.%20You%20don't%20need%20to%20do%20anything%20to%20take%20advantage%20of%20this%20change%20--%20all%20your%20existing%20ARM%20templates%2C%20Azure%20Policies%2C%20and%20deployment%20scripts%20will%20honor%20the%20new%20default.%20Extensions%20that%20are%20already%20installed%20on%20your%20servers%20will%20remain%20unchanged%20and%20retain%20their%20current%20automatic%20upgrade%20preference.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20fastest%20way%20to%20find%20out%20which%20of%20your%20Azure%20Arc-enabled%20server%20extensions%20have%20automatic%20upgrades%20enabled%20is%20to%20use%20Azure%20Resource%20Graph%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-sql%22%3E%3CCODE%3Eresources%0A%7C%20where%20type%20%3D~%20%22microsoft.hybridcompute%2Fmachines%2Fextensions%22%0A%7C%20project%20id%2C%20publisher%20%3D%20properties.publisher%2C%20type%20%3D%20properties.type%2C%20automaticUpgradesEnabled%20%3D%20properties.enableAutomaticUpgrade%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%23blade%2FHubsExtension%2FArgQueryBlade%2Fquery%2Fresources%250A%257C%2520where%2520type%2520%253D~%2520%2522microsoft.hybridcompute%252Fmachines%252Fextensions%2522%250A%257C%2520project%2520id%252C%2520publisher%2520%253D%2520properties.publisher%252C%2520type%2520%253D%2520properties.type%252C%2520automaticUpgradesEnabled%2520%253D%2520properties.enableAutomaticUpgrade%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ETry%20this%20query%20in%20your%20own%20subscription%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3EIf%20you%20need%20to%20prevent%20an%20extension%20from%20automatically%20upgrading%20on%20a%20server%20(for%20example%2C%20if%20it%20has%20strict%20change%20windows%20and%20can%20only%20be%20updated%20at%20certain%20times)%2C%20you%20can%20opt%20out%20of%20this%20behavior%20when%20deploying%20the%20extension%20by%20setting%20the%26nbsp%3B%3CEM%3EenableAutomaticUpgrade%3C%2FEM%3E%20property%20in%20your%20ARM%20template%2C%20PowerShell%2C%20or%20CLI%20command%20to%26nbsp%3B%3CEM%3Efalse%3C%2FEM%3E.%20You%20can%20also%20update%20the%20setting%20anytime%20after%20the%20extension%20is%20deployed%20by%20modifying%20the%20extension.%20The%20below%20PowerShell%20command%20shows%20how%20to%20disable%20automatic%20extension%20upgrades%20for%20an%20Azure%20Log%20Analytics%20Agent%20extension%20on%20a%20Linux%20server%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-AzConnectedMachineExtension%20-MachineName%20%22ArcServerName%22%20-Name%20%22ExtensionName%22%20-ResourceGroupName%20%22MyRG%22%20-Location%20%22ArcServerLocation%22%20-Publisher%20%22Microsoft.EnterpriseCloud.Monitoring%22%20-ExtensionType%20%22OmsAgentForLinux%22%20-EnableAutomaticUpgrade%3A%24false%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe're%20also%20working%20on%20a%20portal%20experience%20to%20let%20you%20manage%20automatic%20extension%20upgrade%20preferences%20in%20the%20browser%20and%20an%20Azure%20policy%20that%20will%20let%20you%20audit%20and%20enforce%20this%20setting%20across%20an%20entire%20resource%20group%2C%20subscription%2C%20or%20management%20group.%20Stay%20tuned%20for%20these%20new%20features!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERyan%20on%20behalf%20of%20the%20Azure%20Arc-enabled%20servers%20team%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3292405%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Arc%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EServers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 25 2022 12:20 PM
Updated by: