Azure Update Manager: patch Windows and Linux

Azure Update Manager checks for, schedules and installs operating system updates on your Windows and Linux VMs from a single place. It took over from Automation Update Management, which retired in 2024, and there’s no charge for using it on Azure VMs.

Patching is the most regular maintenance job you’ll have as an Azure admin. Most of the trouble with it isn’t the updates themselves but things around them: VMs that can’t reach the update servers, schedules that never ran, and servers that are “patched” but still waiting for a reboot.

You’ll give web01 and win01 a route out to the update servers, assess and install updates and set up a weekly schedule, and then break patching in the two ways it breaks in real life.

TimeYou needCostBy the end you can
About 75 minutes (Windows updates on a small VM are slow)web01, win01, vnet-saat, the CLI and the portalAbout 15 US cents for a temporary NAT Gateway and its public IP over two hours; Update Manager itself has no charge for Azure VMsAssess and install updates, schedule patching, and troubleshoot failed or half-done patch runs

What it is, in one line

Azure Update Manager finds the OS updates your VMs are missing and installs them, either when you ask or on a schedule.

In Simple Words

The school nurse’s vaccination day

First the nurse goes through every child’s card to see which vaccines are missing, and that’s an assessment. Then she books a day for each class and gives the shots, which is your maintenance schedule and the install. Some vaccines only work if the child rests afterwards, and that rest is the reboot.

And if the bus carrying the vaccines can’t get to the school, nothing happens on vaccination day, however good the plan was. For a VM, that bus is its route to the update servers.

Engineer's View

How Update Manager works

  • No agent to install: it works through a VM extension that the VM agent puts in place. There’s no Update Manager charge for Azure VMs, while Arc-enabled servers (Lesson 40) are billed per server per month.
  • Assessment: either on demand (az vm assess-patches) or periodic, which means every 24 hours once periodic assessment is switched on.
  • One-time install: az vm install-patches, where you give the classifications, a maximum duration and a reboot setting (IfRequired, Never, Always).
  • Patch orchestration (the VM’s patch mode): to use your own schedules you need Customer Managed Schedules, which is patchMode AutomaticByPlatform plus bypassPlatformSafetyChecksOnUserSchedule. With Azure Managed, Safe Deployment, Azure patches critical and security updates itself in off-peak hours. The remaining modes are Windows Automatic Updates and Manual.
  • Schedules are maintenance configurations (scope InGuestPatch). You assign them to VMs directly, or through dynamic scopes based on tag, subscription or resource group, and updates only start while there’s still time left in the window.
  • Hotpatch: on Windows Server 2025 Datacenter Azure Edition, which is what win01 runs, most security updates go in without a reboot, and you plan a baseline reboot roughly every three months.
  • Network: the VM has to be able to reach its update source, which is Windows Update or the Ubuntu archive mirrors in Azure. A private subnet needs a NAT Gateway, a firewall or an internal mirror for that.

How it works, step by step

What happens on a scheduled Sunday at 02:00:

Azure Update Manager scheduled patch run step by step
  1. The window in the maintenance configuration opens for every VM assigned to it.
  2. Update Manager checks that each VM’s patch mode is set to Customer Managed Schedules.
  3. Inside the VM, the extension refreshes the package list and picks out the Critical and Security updates.
  4. It installs them as long as there’s time left in the 3-hour window, and reboots if it has to.
  5. The results land in the update history and in Azure Resource Graph, and you query them on Monday.

If step 3 can’t reach the update servers, the run fails for that VM, and nobody finds out unless someone looks at the history or an alert goes off.

Azure Update Manager patch orchestration modes compared

Give dev and test VMs their own schedule a few days ahead of production, so a bad update shows up where it does the least damage.

Hands-on lab: Azure Update Manager on web01 and win01

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

Load the network IDs and start both VMs:

$v = Get-Content C:\azure-lab\vnet-saat.json | ConvertFrom-Json
az vm start --resource-group rg-saat-vms --name web01
az vm start --resource-group rg-saat-vms --name win01

1Give the private subnets a way out

snet-web and snet-mgmt are private subnets (Lesson 11), so attach the NAT Gateway from Lesson 13 for as long as you’re patching:

az network public-ip create --resource-group rg-saat-core --name pip-saat-natgw --sku Standard --location centralindia --tags course=saatvedha-azure lesson=30 -o none
az network nat gateway create --resource-group rg-saat-core --name natgw-saat --public-ip-addresses pip-saat-natgw --idle-timeout 4 --location centralindia --tags course=saatvedha-azure lesson=30 -o none
az network vnet subnet update --ids $v.'snet-web' --nat-gateway natgw-saat -o none
az network vnet subnet update --ids $v.'snet-mgmt' --nat-gateway natgw-saat -o none

2Set patch orchestration and periodic assessment

In the portal, open Azure Update Manager and go to Machines. Tick web01 and win01, choose Settings and then Update settings, set Periodic assessment to Enable and Patch orchestration to Customer Managed Schedules, and Save.

Azure Update Manager update settings
Update settings for web01 and win01.

Now check it from the CLI:

az vm show --resource-group rg-saat-vms --name web01 --query "osProfile.linuxConfiguration.patchSettings.{mode:patchMode, assessment:assessmentMode, bypass:automaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule}" -o table
az vm show --resource-group rg-saat-vms --name win01 --query "osProfile.windowsConfiguration.patchSettings.{mode:patchMode, assessment:assessmentMode, bypass:automaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule}" -o table

You should see this for both:

Mode                 Assessment           Bypass
-------------------  -------------------  --------
AutomaticByPlatform  AutomaticByPlatform  True

3Assess both VMs

Run this. Each one takes a few minutes:

az vm assess-patches --resource-group rg-saat-vms --name web01 --query "{status:status, criticalSecurity:criticalAndSecurityPatchCount, other:otherPatchCount, rebootPending:rebootPending}" -o table
az vm assess-patches --resource-group rg-saat-vms --name win01 --query "{status:status, criticalSecurity:criticalAndSecurityPatchCount, other:otherPatchCount, rebootPending:rebootPending}" -o table

You should see something like this:

Status     CriticalSecurity    Other    RebootPending
---------  ------------------  -------  ---------------
Succeeded  4                   11       False
Status     CriticalSecurity    Other    RebootPending
---------  ------------------  -------  ---------------
Succeeded  2                   1        False

4Install security updates on web01

Run this:

az vm install-patches --resource-group rg-saat-vms --name web01 --maximum-duration PT1H --reboot-setting IfRequired --classifications-to-include-linux Critical Security --query "{status:status, installed:installedPatchCount, failed:failedPatchCount, reboot:rebootStatus}" -o table

You should see something like this:

Status     Installed    Failed    Reboot
---------  -----------  --------  -----------
Succeeded  4            0         NotNeeded

5Create a weekly schedule and assign both VMs

Build the maintenance configuration. It runs every Sunday at 02:00 IST for 3 hours and covers Critical and Security:

$start = (Get-Date).Date.AddDays(7 - [int](Get-Date).DayOfWeek).ToString('yyyy-MM-dd') + ' 02:00'
$mc = @{
    location = 'centralindia'
    properties = @{
        maintenanceScope    = 'InGuestPatch'
        extensionProperties = @{ InGuestPatchMode = 'User' }
        maintenanceWindow   = @{ startDateTime = $start; duration = '03:00'; timeZone = 'India Standard Time'; recurEvery = 'Week Sunday' }
        visibility          = 'Custom'
        installPatches      = @{
            rebootSetting     = 'IfRequired'
            windowsParameters = @{ classificationsToInclude = @('Critical', 'Security') }
            linuxParameters   = @{ classificationsToInclude = @('Critical', 'Security') }
        }
    }
}
$mc | ConvertTo-Json -Depth 8 | Set-Content -Path C:\azure-lab\mc-weekly.json
$sub = az account show --query id -o tsv
$mcId = "/subscriptions/$sub/resourceGroups/rg-saat-vms/providers/Microsoft.Maintenance/maintenanceConfigurations/mc-saat-weekly"
az rest --method put --url "https://management.azure.com${mcId}?api-version=2023-04-01" --body '@C:\azure-lab\mc-weekly.json' --query "properties.maintenanceWindow" -o yaml

You should see something like this:

duration: 03:00
recurEvery: Week Sunday
startDateTime: 2026-10-25 02:00
timeZone: India Standard Time

Then assign web01 and win01 to it:

Set-Content -Path C:\azure-lab\mc-assign.json -Value ('{"location": "centralindia", "properties": {"maintenanceConfigurationId": "' + $mcId + '"}}')
foreach ($vm in 'web01', 'win01') {
    $id = az vm show --resource-group rg-saat-vms --name $vm --query id -o tsv
    az rest --method put --url "https://management.azure.com${id}/providers/Microsoft.Maintenance/configurationAssignments/weekly?api-version=2023-04-01" --body '@C:\azure-lab\mc-assign.json' -o none
}
az rest --method get --url "https://management.azure.com${mcId}?api-version=2023-04-01" --query "name" -o tsv

You should see this:

mc-saat-weekly

In the portal, Update Manager, Machines now lists both VMs with the schedule. Once you have lots of VMs, assigning by tag with a dynamic scope works better, because new VMs join the schedule on their own.

Azure Update Manager machines with a maintenance schedule
Both VMs linked to mc-saat-weekly.
Azure Update Manager lab: assessment, install and weekly schedule
Assess, install, then a weekly maintenance configuration.

✅ Checkpoint: Both VMs use Customer Managed Schedules with periodic assessment, web01 has its security updates, and mc-saat-weekly covers both.

Break It, Then Fix It

Keep both VMs running. First you’ll remove the NAT Gateway, the same way it happens at work: “it was only for the migration”.

1Break it: patching with no way out

Take the NAT Gateway off snet-web and assess web01 again:

az network vnet subnet update --ids $v.'snet-web' --remove natGateway -o none
az vm assess-patches --resource-group rg-saat-vms --name web01 --query "{status:status, error:error.details[0].message}" -o yaml

You’ll see something like this:

error: 'Unexpected return code (100) from package manager on command: LANG=en_US.UTF8
  sudo apt-get -q update'
status: Failed

apt can’t get to the Ubuntu archive, so it exits with code 100. On a schedule this fails quietly every week while the list of missing updates on the dashboard keeps growing. Windows VMs fail in the same way, with a Windows Update connection error.

Fix it: give the subnet a way out again (NAT Gateway, Azure Firewall or an internal mirror), and then assess it again:

az network vnet subnet update --ids $v.'snet-web' --nat-gateway natgw-saat -o none
az vm assess-patches --resource-group rg-saat-vms --name web01 --query "{status:status, criticalSecurity:criticalAndSecurityPatchCount, other:otherPatchCount, rebootPending:rebootPending}" -o table

You should see something like this:

Status     CriticalSecurity    Other    RebootPending
---------  ------------------  -------  ---------------
Succeeded  0                   11       False

2Break it: patched, but not really

Install win01’s updates with reboots not allowed, the way someone might do it during business hours:

az vm install-patches --resource-group rg-saat-vms --name win01 --maximum-duration PT2H --reboot-setting Never --classifications-to-include-win Critical Security --query "{status:status, installed:installedPatchCount, reboot:rebootStatus}" -o table
az vm assess-patches --resource-group rg-saat-vms --name win01 --query "{status:status, criticalSecurity:criticalAndSecurityPatchCount, other:otherPatchCount, rebootPending:rebootPending}" -o table

You should see something like this:

Status     Installed    Reboot
---------  -----------  --------
Succeeded  2            Required
Status     CriticalSecurity    Other    RebootPending
---------  ------------------  -------  ---------------
Succeeded  0                   1        True

The report says Succeeded with zero missing security updates, but the fix in a cumulative update doesn’t take effect until Windows restarts. Scanners and attackers alike still see the old, vulnerable files loaded.

Fix it: restart in a window everyone has agreed on, and then confirm nothing is pending:

az vm restart --resource-group rg-saat-vms --name win01
az vm assess-patches --resource-group rg-saat-vms --name win01 --query "{status:status, criticalSecurity:criticalAndSecurityPatchCount, other:otherPatchCount, rebootPending:rebootPending}" -o table

You should see something like this:

Status     CriticalSecurity    Other    RebootPending
---------  ------------------  -------  ---------------
Succeeded  0                   1        False

To clean up, remove the assignments, the schedule and the NAT Gateway, and then stop both VMs:

foreach ($vm in 'web01', 'win01') {
    $id = az vm show --resource-group rg-saat-vms --name $vm --query id -o tsv
    az rest --method delete --url "https://management.azure.com${id}/providers/Microsoft.Maintenance/configurationAssignments/weekly?api-version=2023-04-01"
}
az rest --method delete --url "https://management.azure.com${mcId}?api-version=2023-04-01"
az network vnet subnet update --ids $v.'snet-web' --remove natGateway -o none
az network vnet subnet update --ids $v.'snet-mgmt' --remove natGateway -o none
az network nat gateway delete --resource-group rg-saat-core --name natgw-saat
az network public-ip delete --resource-group rg-saat-core --name pip-saat-natgw
az vm deallocate --resource-group rg-saat-vms --name web01
az vm deallocate --resource-group rg-saat-vms --name win01
C:\azure-lab\Find-LabResources.ps1 -Lesson 30

You should see this:

Nothing tagged course=saatvedha-azure is left.
Azure Update Manager errors: failed assessment and pending reboot
No outbound path, and updates waiting for a reboot.

✅ Checkpoint: You fixed a failed assessment and a pending reboot. The schedule and NAT Gateway are gone, and both VMs are deallocated.

The patch settings from step 2 stay on both VMs. They cost nothing, and they’re what you’d want in a real environment anyway.

This happened at work

“All servers patched” for six months

For half a year, a healthcare company’s monthly report showed 100% patch compliance across 300 VMs. Then an outside penetration test turned up 60 servers that were missing a critical fix released four months earlier.

All 60 of them were in one spoke VNet whose outbound traffic went through Azure Firewall, and a change to a firewall rule had blocked the Ubuntu archive and Windows Update for that spoke. Every scheduled run there had failed. The report never showed it, because it counted VMs that were “in a schedule” rather than VMs that had finished one.

What they changed: the report is now built from the patch installation results in Azure Resource Graph and shows the last successful run for each VM. An alert goes off whenever a VM’s assessment or run fails, and every firewall change now includes a test that a VM in each spoke can still reach its update sources.

Common mistakes and troubleshooting

MistakeWhat you seeWhat to do
No outbound path from the subnetAssessments fail; apt exit code 100NAT Gateway, Azure Firewall rules, or a mirror.
Wrong patch orchestration modeSchedule assigned but never runsCustomer Managed Schedules on every VM.
Reboot set to Never and no follow-upUpdates installed but not activeReboot in a window; check rebootPending.
Window too shortUpdates skipped as the window closesAllow enough time; split big groups.
Reporting on schedules, not resultsCompliance looks perfect, servers aren’tReport on installation results in Resource Graph.
Production and test in one scheduleA bad update hits everything at onceTest first, production a few days later.

Interview questions

Click any question to open it. They’re worded the way an interviewer would ask them, and under each one you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. What is Azure Update Manager?

Why they ask this: To see if you know the basic idea.

How you might answer: It’s a service that assesses and installs OS updates for Azure VMs and Arc-enabled servers from one place, on demand or on a schedule. It replaced Automation Update Management.

2. What is an update assessment?

Why they ask this: They want to hear that checking and installing are different things.

How you might answer: It’s a scan that lists the missing updates by classification without installing anything. You can run it on demand, or every 24 hours with periodic assessment.

3. What does the reboot setting control?

Why they ask this: It’s a basic setting they expect you to know.

How you might answer: It decides whether the VM is allowed to restart during patching: only if an update needs it, never, or always. If you pick Never, you can end up with updates that are installed but not active.

2–5 years experience

4. A scheduled patch run didn’t patch some VMs. What do you check?

Why they ask this: It’s a troubleshooting path you’ll walk in real life.

How you might answer: I’d check the VM’s patch orchestration mode, whether it’s assigned to the schedule or matches the dynamic scope, and whether it was running during the window. Then its update history for errors, and whether it could reach its update source. Most of the time it turns out to be a network block.

5. How do you patch VMs in private subnets?

Why they ask this: They’re checking you know about the 2026 networking change.

How you might answer: Private subnets don’t get default outbound access, so you have to give them a path: a NAT Gateway, Azure Firewall with rules for the update endpoints, or an internal repository or WSUS. And after any firewall change I’d test each spoke.

6. Why is Customer Managed Schedules needed?

Why they ask this: They want to see you know the prerequisite.

How you might answer: Update Manager only runs your maintenance configurations on VMs that have patch mode AutomaticByPlatform with the bypass flag set, and that combination is called Customer Managed Schedules. Without it, the platform or the OS decides when to patch.

Senior level

7. How would you design patching for 2,000 VMs?

Why they ask this: They want to hear about rings, scopes and reporting.

How you might answer: I’d set up rings by environment using dynamic scopes on tags, with test first and production in waves a few days apart. Policy would set the patch mode and periodic assessment, pre and post events would stop and start the apps, and Resource Graph reports would drive alerts on failures and pending reboots.

8. What is hotpatch and when would you use it?

Why they ask this: They’re checking you keep up with current Windows features.

How you might answer: On Windows Server 2025 Azure Edition and a few other editions, hotpatch puts most security updates into running memory without a reboot. You still restart for the baseline updates every few months. It’s great for high-availability servers where reboots are hard to schedule.

9. How do you prove patch compliance to an auditor?

Why they ask this: They want evidence, not screenshots.

How you might answer: I’d export the Resource Graph results for assessments and installations per VM over the period, showing the last successful install, any missing critical updates and pending reboots, and keep them in Log Analytics or storage for as long as the audit retention period says.

Quick quiz

Q1. Which patch mode is required for your own schedules?

  1. Manual
  2. ImageDefault
  3. Customer Managed Schedules
  4. AutomaticByOS
Show answer

C — AutomaticByPlatform plus the bypass flag.

Q2. How often does periodic assessment run?

  1. Every hour
  2. Every 24 hours
  3. Every week
  4. Never
Show answer

B — Periodic assessment runs about every 24 hours.

Q3. apt fails with exit code 100 during assessment on a private subnet. Likely cause?

  1. Wrong tier
  2. No outbound path to the archive
  3. Key rotated
  4. Disk full
Show answer

B — The VM can’t reach its update source.

Q4. Install with reboot setting Never on Windows. Risk?

  1. None
  2. Updates not active until reboot
  3. VM deleted
  4. Assessment disabled
Show answer

B — Many Windows updates need a restart to take effect.

Q5. What does Update Manager cost for Azure VMs?

  1. USD 5 per VM per month
  2. No charge
  3. Per update
  4. Per GB
Show answer

B — There is no Update Manager charge for Azure VMs.

Quick recap

You can now keep VMs patched and show proof that they are.

  • Assess first, then install on demand or on a schedule.
  • Schedules need Customer Managed Schedules on each VM.
  • Private subnets need an explicit route to update sources.
  • Watch rebootPending; installed is not the same as active.
  • Report on results, not on schedules.

Next lesson

Lesson 31: Azure Monitor: metrics, Activity log, alerts → Next, you read VM metrics and the Activity log, and build alerts that page you when something breaks.

Further reading: Azure Update Manager

Want to go deeper into Azure Update Manager? Microsoft’s About Azure Update Manager and Schedule recurring updates are good next reads, and the full plan for this course is on the Azure Cloud Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.