As you know you can add extensions (small applications that provide post-deployment configuration and automation tasks) to your virtual machine running on Azure.
Well, you can now get these extensions automatically upgrade when there is a new version.
This is a preview capability which means there is no SLA associated with it in case of trouble.
Automatic Extension Upgrade has the following features:
If, within 5 minutes after the extension has been upgraded, the virtual machine is seen unhealthy then the extension is automatically rolled back to the previous version.
Currently only 2 extensions support the automatic upgrade:
If you want to evaluate the capability, you need to run the below PowerShell commands (or Azure Cli equivalent)
Register-AzProviderFeature -FeatureName AutomaticExtensionUpgradePreview -ProviderNamespace Microsoft.Compute
Register-AzResourceProvider -ProviderNamespace Microsoft.Compute
Then you can enable the supported extensions using the Set-AzVMExtension for virtual machine or Add-AzVmssExtension for virtual machine scale set
Set-AzVMExtension -ExtensionName “Microsoft.Azure.Monitoring.DependencyAgent” -ResourceGroupName “resource group of the VM” -VMName “VM name” -Publisher “Microsoft.Azure.Monitoring.DependencyAgent” -ExtensionType “DependencyAgentWindows” -TypeHandlerVersion 9.5 –Location <location of the VM> -EnableAutomaticUpgrade $true
Add-AzVmssExtension –VirtualMachineScaleSet <VM scale set> -Name “Microsoft.Azure.Monitoring.DependencyAgent” -Publisher “Microsoft.Azure.Monitoring.DependencyAgent” -Type “DependencyAgentWindows” -TypeHandlerVersion 9.5 -EnableAutomaticUpgrade $true