An Azure service that is used to provision Windows and Linux virtual machines.
The VM must first be repaired from the CRITICAL_SERVICE_FAILED (0x5A) Windows boot failure; RDP cannot work while the guest operating system is repeatedly crashing.
Since restarting has not helped and the diagnostic screenshot shows the stop code, proceed with OS-disk recovery rather than restarting again. This stop error can result from a faulty driver, corrupted system file, or invalid memory access, but the screenshot alone does not determine which one.[^1^](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")
1. Protect the OS disk
Disk replacement and offline repair carry risk, so preserve the current disk first:
- Stop the affected VM cleanly if possible.
- In Azure Portal, open Virtual machines → affected VM → Disks.
- Select the OS disk.
- Select Create snapshot and complete the deployment using the default settings.
A snapshot provides a read-only recovery point before any repair changes.^2^
If a recent known-good Azure Backup recovery point exists, restoring the VM from it is also a documented recovery option.[^1^](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")
2. Repair a copy of the OS disk offline
Use a repair VM rather than modifying the only copy:
- Open the new snapshot and select Create Disk.
- Create the disk in the same region and availability zone that will be used for the repair VM.
- Create a temporary Windows Server VM in that region and zone.
- 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 identify the attached Windows volume letter, such as
F:.
Microsoft documents automated Azure VM repair commands as the preferred method for supported managed-disk configurations; encrypted disks require the matching encryption-specific recovery procedure.^2^
3. Recover the 0x5A boot failure
Microsoft’s procedure for this stop code is to collect Memory.dmp from the attached disk and submit it with an Azure support request so the failing driver or component can be identified:
- On the repair VM, browse to
<attached-drive>:\Windows. - Locate
Memory.dmp. - Open an Azure support request and attach the dump file.[^1^](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 the dump analysis identifies an unsigned or corrupt driver, Microsoft’s documented repair path is to boot the repaired disk into Safe Mode and replace the identified file with the same version from a compatible working VM. For example, if the attached disk is F::
bcdedit /store F:\boot\bcd /set {default} safeboot minimal
REM After replacing the identified driver, remove Safe Mode:
bcdedit /store F:\boot\bcd /deletevalue {default} safeboot
Do not replace drivers speculatively. Use the file identified by dump analysis, and retain the snapshot for rollback.[^1^](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")
After repair:
- Detach the repaired disk from the repair VM.
- Open the original VM’s Disks blade.
- Select Swap OS disk and choose the repaired disk.
- Start the original VM.
- Check Boot diagnostics. Continue to RDP troubleshooting only when it shows the normal Windows sign-in screen.^2^
4. If Windows boots but the VA still cannot connect
Then test the separate RDP network path from the VA’s current public IP:
- Open Network Watcher → Network diagnostic tools → IP flow verify.
- Select the VM and its primary NIC.
- Set:
- Protocol: TCP
- Direction: Inbound
- Local IP: VM private IP
- Local port:
3389 - Remote IP: VA’s public IP
- Remote port: any available port, such as
60000
- Select Check.
If Denied, the result identifies the blocking NSG rule. Review VM → Networking → Network settings → NIC → Effective security rules. TCP 3389 must be allowed from the VA’s source IP at both the subnet and NIC levels, with no higher-priority deny rule.^3^
Avoid allowing RDP from the entire Internet. Restrict the rule to the VA’s current public IP, or use Azure Bastion for production access.
References