An Azure service that is used to provision Windows and Linux virtual machines.
The VM must be repaired at the guest-OS level by attaching a copy of its OS disk to a recovery VM, because the CRITICAL_SERVICE_FAILED (0x5A) boot failure prevents both the Azure VM Agent and RDP from starting.
Resetting the NIC or redeploying changes Azure networking or the physical host; neither repairs a Windows boot failure, so those already-tried actions do not need to be repeated.
1. Protect the OS disk and create a repair VM
These operations modify boot configuration and possibly system drivers. Keep the original OS disk unchanged so that you can roll back.
- Stop the affected VM if possible.
- In Azure portal → affected VM → Disks, select the OS disk.
- On the disk’s Overview page, select Create snapshot.
- Open the resulting snapshot and select Create Disk.
- Create a temporary Windows repair VM in the same region and availability zone as the copied disk.
- On the repair VM, open Disks → Attach existing disks, select the disk created from the snapshot, and select Save.
- Connect to the repair VM and use Disk Management to identify the attached disk’s Windows volume letter—for example,
F:.
This snapshot-copy workflow allows offline servicing without changing the original disk.^1^
If the disk uses Azure Disk Encryption, follow the applicable encrypted-disk path in that recovery article rather than mounting it as an ordinary data disk.
2. Boot the affected OS into Safe Mode
From an elevated Command Prompt on the repair VM, set Safe Mode on the attached OS disk. Replace F: with its actual volume letter:
bcdedit /store F:\boot\bcd /set {default} safeboot minimal
Then:
- Detach the copied OS disk from the repair VM.
- In affected VM → Disks, select Swap OS disk and choose the repaired copy.
- Start the affected VM. Windows should attempt to enter Safe Mode.
Microsoft’s documented remediation for this stop code uses Safe Mode to locate unsigned drivers. The stop error can also result from a corrupted system file or memory issue, so the Windows Update or unsigned-driver explanation should not be treated as confirmed until the failing component is identified.[^2^](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/windows/troubleshoot-critical-service-failed-boot-error#solution "Windows shows "CRITICAL SERVICE FAILED" on blue screen when booting an Azure VM")
3. Identify and replace an unsigned driver
If Windows reaches Safe Mode:
- Press Windows+R, enter
verifier, and press Enter. - In Driver Verifier Manager, select Automatically select unsigned drivers.
- Record every driver file reported.
- Replace an identified file only with the same version obtained from an equivalent, working VM.
- Shut down the VM and attach its OS disk to the repair VM again.
- Remove the Safe Mode setting:
bcdedit /store F:\boot\bcd /deletevalue {default} safeboot
- Detach the disk, swap it back onto the affected VM, and start the VM normally.[^2^](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/windows/troubleshoot-critical-service-failed-boot-error#solution "Windows shows "CRITICAL SERVICE FAILED" on blue screen when booting an Azure VM")
Do not copy an arbitrary driver from a different Windows build; a mismatched system driver can leave the VM unbootable.
4. If Safe Mode still crashes
Collect the crash dump rather than continuing with network or RDP changes:
- Attach the affected OS disk to the repair VM.
- Check
<attached-drive>:\Windows\Memory.dmp. - Open an Azure support request and attach
Memory.dmp.
If no dump exists, the official procedure provides the registry and BCD configuration required to enable crash dumps and the serial console. Registry editing is risky; preserve the snapshot and back up Windows\System32\config before making those changes.[^2^](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/windows/troubleshoot-critical-service-failed-boot-error#solution "Windows shows "CRITICAL SERVICE FAILED" on blue screen when booting an Azure VM")
If a recent known-good Azure Backup recovery point exists, restoring the VM from that backup is the safer alternative to manual driver replacement.
5. Verify recovery
After Windows boots normally:
- Confirm Boot Diagnostics no longer shows the blue-screen loop.
- Wait for the Azure VM Agent status to change to Ready.
- Test RDP.
- Review Event Viewer → Windows Logs → System and Windows Update history to identify the driver, update, or system component involved before applying updates again.
Only troubleshoot the VM Agent or RDP separately if Windows now remains booted but the agent still reports Not ready or RDP still fails.
References