Keep all your Servers Patched using Azure Update Manager -- A Technical Guide
1 - What is Azure Update Manager :
Azure Update Manager is a service that helps manage updates for all your machines, including those running Windows and Linux, in Azure, on-premises and on other cloud platforms.
You can quickly assess the status of available updates and manage the process of installing required updates for your machines by reporting to the update management center.
2 - Benefits of Azure Update Manager :
Here are some key benefits of using Azure Update Manager:
3 - Prerequisites :
To follow this article, you need to have the following:
4 - Pricing for Azure Update Manager :
5 - How Azure Update Manager can works :
6 - Update Options :
The Azure Update Manager services provide various update options:?
7 - Notable notes about Azure Update Manager :
8 - Mindmap to configure Azure Update Manager :
Here are the steps to follow to set up Azure Update Manager :
9 - Start Config Azure Update Manager (AUM) :
In this blog, I've chosen to install two machines for testing: Windows server 2019 and Ubuntu Server 23.
we'll start by accessing Azure Update Manager by typing the name in the Azure search bar then select "Azure Update Manager"
on the main overview page, you can get an idea of the number of servers managed by AUM and their update status (2 VMs in our case) :
For more details, click on the machine menu on the left to see the number of pending updates for each VM.
We can see that there are 4 pending updates for VM1-Windows and 43 pending updates for VM2-Linux (this is about all updates cathegories : Security, critycal, service Packs, FeaturePacks...etc).
Updates can be applied in two ways :
A - Manually Updates using Azure Update Manager :
Here are the steps for manually updating Azure virtual machines (VMs) from the Azure Update Manager :
B - Manage Updates through Azure Policies :
Using Azure Update Manager with Azure policies offers a number of benefits, such as centralized management of available updates, large-scale automatic updates, monitoring of update compliance, and instant deployment of critical updates.
In the following steps we will :
i - Configure Policy for periodic checking for missing system updates on azure virtual machines :
Microsoft Azure's “Periodic checking for missing system updates on Azure virtual machines” policy is used to enable periodic evaluation of missing updates on your Azure virtual machines (VMs). This policy enables a feature on your machine that lets you see the latest updates available for your machines, and eliminates the need to perform a manual assessment every time you need to check the update status. After activating this setting, Update Manager retrieves updates from your machine once every 24 hours.
To get started, you can follow these steps :
Configure auto-assessment (every 24 hours) for OS updates on native Azure virtual machines. You can control the scope of assignment according to machine subscription, resource group, location or tag. Learn more about this for Windows: https://aka.ms/computevm-windowspatchassessmentmode , for Linux: https://aka.ms/computevm-linuxpatchassessmentmode .
this window allows us to filter the resources on which we will check for updates.
in this window I've added a few filter parameters without actually applying them, just to show you what you can do with them.
so I won't touch anything here and I'll click on “Next”.
Same thing, I won't touch anything here and I'll click on “Next”.
in this window, you can write non-compliance message.
Non-compliance messages help users understand why a resource is not compliant with the policy. The message will be displayed when a resource is denied and in the evaluation details of any non-compliant resource.
ii - Create Maintenance configuration for schedule update installation :
Creating a “Maintenance configuration for schedule update installation” in Microsoft Azure is an important step in managing updates for your virtual machines (VMs) in Azure.
This configuration lets you define a schedule for the installation of updates on your VMs. You can specify which machines are to be updated and which updates are to be installed. This configuration is particularly useful for ensuring that your VMs are always up to date with the latest security and functionality updates.
once the Configure periodic checking for missing system updates on azure virtual machines has been created, we'll move on to the creation of a maintenance configuration.
you can follow these steps:
领英推荐
In this section we will assign dynamic scope for maintenance configuration.
After selecting your subscription (Azure Subscription 1 in my case), you'll be able to filter updates by several types:
in the configuration I'm going to apply the updates on my two test servers (VM-Windows and VM-Linux), that mean all my servers will go down for a while to install the updates.
If you want to implement this on your production servers that are located at several sites, you can create two or more maintenance configuration and filter the updates by region so that your backup servers are always up and running, no service down.
Clic on "Select" to filter by different cathegories.
you can filter by :
I will let everuthing as default and Select "Save"
A new window will appear :
The “Resource” window is used to select and assign specific resources to a maintenance configuration, but since I've already set up a dynamic scope, I don't need to make any changes here.
In the Updates window, click on "Include update classification" choose the type of updates you want to deploy. You can also "Include KB" packages or "Exclude KB".
The following tables list the update classifications in Update Management, with a definition for each classification.
Select "Review + Create"
If you now return to the Azure Update Manager main window, you can see a change in the “Patch orchestration configuration of Azure virtual machines” section.
iii - Setup Policy for Schedule recurring updates using Azure Update Manager :
Microsoft Azure's “Schedule recurring updates using Azure Update Manager” policy is used to create and save recurring deployment schedules. This policy lets you specify which machines are to be updated as part of the schedule, and which updates are to be installed. You can create a schedule on a daily, weekly or hourly basis. This policy then automatically installs updates according to the schedule created for a single large-scale virtual machine (VM). Update Manager uses a maintenance control schedule instead of creating its own schedules. Maintenance control enables customers to manage platform updates.
To get started, you can follow these steps :
Select "Schedule recurring updates using Azure Update Manager" Policy :
Select "Assign"
You can customize "Ressource selector" from here, in my case no need and clic "Next"
Here we need to enter maintenance configuration ID.
To get maintenance configuration ID :
Go to properties on the left hand menu and copie the "id"
Select "Create" to create policy.
we've finished configuring our update plan on Azure Update Manager, and here's the result after applying the updates (I chose all types of updates to be installed to see this green circle ??).
As we can see all VMs status in green with all updates installed.
To see update history, clic on History on the left-hand menu :
10 - Conclusion :
All in all, Azure Update Manager is proving to be an essential tool for managing Azure virtual machine updates. Its ability to automate and schedule updates, while offering precise control over the process, makes it a valuable asset for system administrators. What's more, with features such as dynamic scopes and maintenance configurations, Azure Update Manager offers unprecedented flexibility and adaptability, enabling efficient management of large-scale updates.
Thanks
Aymen El Jaziri
System Administrator
CISO | Director of Security | Director of Technology
2 个月Great article. I do have one question. Can Azure Update Manager be used for Ubuntu Linux Kernel Updates for Azure ARC onboarded on-prem virtual machines? Achieve for example USN-6974-1: Linux kernel vulnerabilities | Ubuntu security notices | Ubuntu updates