When "Getting Windows Ready" Becomes a Nightmare – and TrustedInstaller Is the Villain
Tags: hyper-v windows-server troubleshooting trustedinstaller windows-update
It started like a completely normal evening. A Windows Server 2016 VM sitting on Hyper-V, spinning away at the "Getting Windows Ready" screen – for almost two hours. What followed was a deep dive through checkpoints, corrupted VHDX chains, registry hives, and finally one single command that solved everything.
Here's the full story.
The Setup
- Host: Hyper-V on Windows Server
- Guest: Windows Server 2016 VM
- Symptom: Stuck on "Getting Windows Ready" after a cumulative Windows Update – for nearly 2 hours
Phase 1 – The Obvious Steps
First instinct: wait it out. HDD activity can spike during large updates, especially on VMs with spinning disks or limited I/O. But after two hours with no progress, it was time to act.
A hard reset was attempted. Then another. Both times, Windows booted straight back into the same screen – a classic update loop.
The loop happens when Windows Update partially applies a patch, sets pending operations in the registry or filesystem, and then fails silently on every reboot. Windows keeps trying. Windows keeps failing. You keep staring at the same screen.
Phase 2 – Mounting the VHDX Directly
Since the VM was unreachable via RDP and WinRE wasn't triggering automatically, the plan was to mount the VHDX directly from the Hyper-V host and clean up the update cache manually.
Mount-VHD -Path "D:\Hyper-V\VMNAME\Virtual Hard Disks\vmname-disk-c.vhdx" -ReadWrite
The target: rename the SoftwareDistribution folder to break the update loop.
ren E:\Windows\SoftwareDistribution SoftwareDistribution.old
✅ Done. VHDX dismounted. VM started.
Result: Still stuck on "Getting Windows Ready."
Phase 3 – The VHDX Chain Breaks
Here's where things got interesting – and slightly nerve-wracking.
It turned out the VM had an existing checkpoint (.avhdx differencing disk). By mounting the parent VHDX directly, the parent-child relationship between the base disk and the differencing disk was broken. Hyper-V tracks this relationship using internal identifiers, and mounting the parent externally caused an ID mismatch.
The error on next start:
The chain of virtual hard disks is corrupted.
There is a mismatch in the identifiers of the parent virtual hard disk
and differencing disk.
Not great. But fixable.
The Fix: Set-VHD -IgnoreIdMismatch
Set-VHD `
-Path "D:\Hyper-V\VMNAME\Virtual Hard Disks\vmname-disk-c_<GUID>.avhdx" `
-ParentPath "D:\Hyper-V\VMNAME\Virtual Hard Disks\vmname-disk-c.vhdx" `
-IgnoreIdMismatch
This command rewrites only the metadata reference in the differencing disk – no data is moved, nothing is overwritten. It's the surgical fix for exactly this scenario.
⚠️ Lesson learned: Never mount a parent VHDX directly when the VM has active checkpoints. Always merge or delete checkpoints first – or use
Mount-VHDon the differencing disk itself.
VM started again. Still "Getting Windows Ready." Back to square one, but at least the chain was intact.
Phase 4 – WinRE and the Registry Hunt
With SoftwareDistribution already renamed and the VHDX chain repaired, the next target was the registry. The goal: find and remove any pending operation flags that were keeping Windows in the loop.
WinRE was triggered using the 3x hard reset method – forcefully shutting down the VM three times during the boot sequence until Windows automatically drops into the recovery environment.
In the WinRE command prompt, the SYSTEM and SOFTWARE hives were loaded manually:
reg load HKLM\TEMPSOFT C:\Windows\System32\config\SOFTWARE reg query "HKLM\TEMPSOFT\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"
reg query "HKLM\TEMPSOFT\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" reg unload HKLM\TEMPSOFT
Note: In WinRE, the Windows partition is often not
C:\– always verify withdir C:\Windows,dir D:\Windows, etc. first.
Neither key existed. No PendingFileRenameOperations either. The registry was clean.
The update loop had no obvious flag driving it. Something else was keeping Windows stuck.
Phase 5 – The Real Culprit: TrustedInstaller
Here's the twist nobody expects.
The VM was still reachable on the network during the "Getting Windows Ready" phase. A quick check revealed that TrustedInstaller.exe – the Windows Modules Installer, responsible for applying updates – was still running as a process and had simply hung. It wasn't crashing, it wasn't erroring out. It was just... stuck. And Windows was politely waiting for it to finish before proceeding with the boot.
The fix was one command, executed remotely from another machine:
taskkill /S 10.x.x.x /U Administrator /P ******** /IM trustedinstaller.exe
Windows immediately continued booting. Server came up clean.
Root Cause Summary
Stage |
Finding |
|---|---|
Initial symptom |
|
Why looping |
Process still alive across reboots, Windows waited for it |
SoftwareDistribution rename |
Didn't help – process was the issue, not the cache |
VHDX mount |
Caused ID mismatch due to existing checkpoint |
Registry check |
No pending flags found |
Actual fix |
Remote |
Key Takeaways
1. Check network connectivity first If the VM is still reachable during "Getting Windows Ready", you have more options than you think. taskkill /S is a powerful remote tool.
2. Never mount a parent VHDX with active checkpoints Use Set-VHD -IgnoreIdMismatch to recover, but avoid it in the first place.
3. TrustedInstaller can hang silently No event log entry, no crash dump, no obvious sign – it just sits there. If you're stuck in a "Getting Windows Ready" loop with no registry flags and a clean SoftwareDistribution, check whether TrustedInstaller.exe is still alive.
4. Always back up before touching registry or VHDX
Copy-Item "vmname-disk-c.vhdx" "vmname-disk-c.vhdx.bak"
reg export "HKLM\TEMP\ControlSet001\Control\Session Manager" C:\backup.reg
Two hours of troubleshooting. One taskkill. Sometimes IT is exactly like that.