Staring at Event ID 20 entries in my WindowsUpdateClient logs for the 147th time, I knew this wasn't your average update failure. The Azure VM running Windows Server 2012 R2 had become completely update-resistant since April 2016, with every reboot attempt resulting in:
Installation Failure: Windows failed to install the following update
with error 0x800F0922: Security Update for Windows Server 2012 R2 (KB3159398)
The real smoking gun emerged in the CBS.log (Component Based Servicing), which most administrators overlook due to its massive size. After parsing with PowerShell:
# PowerShell snippet to extract relevant CBS.log entries
Select-String -Path "C:\Windows\Logs\CBS\CBS.log" -Pattern "800F0922" |
Out-File "C:\temp\update_errors.txt"
This revealed critical dependency failures in the servicing stack. The VM couldn't apply newer updates because fundamental servicing components were corrupted.
The solution required a surgical approach:
- Download the standalone Servicing Stack Update (SSU) package
- Force install using DISM:
DISM.exe /Online /Add-Package /PackagePath:Windows8.1-KB3173424-x64.msu /NoRestart
Followed by the specific problematic update:
wusa.exe KB3133690.msu /quiet /norestart
For fellow DevOps engineers managing Azure VMs, here's a monitoring script I developed:
# PowerShell Update Health Monitor
$updateSession = New-Object -ComObject Microsoft.Update.Session
$updateSearcher = $updateSession.CreateupdateSearcher()
$failedUpdates = $updateSearcher.Search("IsInstalled=0 and IsHidden=0").Updates |
Where-Object { $_.LastDeploymentChangeTime -lt (Get-Date).AddDays(-7) }
if ($failedUpdates.Count -gt 0) {
Send-MailMessage -To "admin@domain.com" -Subject "Azure VM Update Alert"
-Body "Critical updates failing on $env:COMPUTERNAME"
}
After resolving 800F0922, implement these Azure VM best practices:
- Create pre-update snapshots using Azure Backup
- Schedule update windows during low-traffic periods
- Configure update rings for phased deployment
The complete fix required rebuilding the component store:
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess
Remember to check disk space beforehand - another common silent killer of Windows updates in cloud environments.
If you're managing a Windows Server 2012 R2 Azure VM stuck with error 800F0922 during updates, you're not alone. This issue typically manifests when the system fails to apply cumulative updates, creating an endless loop of failed installations and rollbacks.
The problem presents several telltale signs:
1. Repeated update failures in Control Panel's "View update history"
2. Event ID 20 entries in System logs from WindowsUpdateClient
3. Rollbacks during reboot extending boot time to 15+ minutes
4. WER (Windows Error Reporting) events with bucket type WindowsUpdateFailure3
The 800F0922 error typically occurs when the Component-Based Servicing (CBS) stack encounters conflicts between pending operations and existing installations. In Azure environments, this is often exacerbated by:
- Snapshot/backup processes interrupting update cycles
- Insufficient temporary storage space during update staging
- Corruption in the Windows Update components
First, check disk space with this PowerShell command:
Get-WmiObject Win32_LogicalDisk | Select DeviceID, @{Name="SizeGB";Expression={"{0:N2}" -f ($_.Size/1GB)}}, @{Name="FreeSpaceGB";Expression={"{0:N2}" -f ($_.FreeSpace/1GB)}}
Then reset Windows Update components:
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
For stubborn cases, analyze the CBS log systematically:
# Find the most recent CBS session
$lastSession = Get-WinEvent -LogName "Microsoft-Windows-CBS/Operational" -MaxEvents 1 | Select-Object -ExpandProperty TimeCreated
# Export relevant CBS entries
Get-WinEvent -LogName "Microsoft-Windows-CBS/Operational" |
Where-Object {$_.TimeCreated -ge $lastSession.AddMinutes(-30)} |
Select-Object TimeCreated, Message |
Out-File "C:\Temp\CBS_Filtered.log"
When working with Azure VMs:
- Detach any additional disks before major updates
- Increase the OS disk size if below 127GB
- Disable Azure Backup jobs during update attempts
After applying fixes, verify with:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Remember to check for pending reboots:
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing"
(Get-ChildItem $registryPath).Name -match "RebootPending"