Hey Checkyourlogs Fans,
Upgrading to Windows Server 2022 can occasionally cause issues, leaving IT admins scrambling for answers. One of the most effective tools for diagnosing upgrade failures is Microsoft’s SetupDiag.exe. This lightweight utility is designed to parse log files generated during the upgrade process, pinpointing the root cause of the failure. In our case, I was troubleshooting an upgrade of an Azure VM and got the following error message 0x800F081e – 0x20003: “The Installation failed in the SAFE_OS phase with an error during INSTALL_UPDATES operation.”
What is SetupDiag?
SetupDiag is a standalone diagnostic tool from Microsoft that analyzes Windows setup log files to identify why an upgrade or installation failed. It provides detailed error codes, descriptions, and possible solutions, helping you avoid sifting through multiple logs manually.
Steps to Use SetupDiag
- Download SetupDiag.exe: Get the latest version from https://go.microsoft.com/fwlink/?linkid=870142
- Information on Setupdiag – SetupDiag | Microsoft Learn
- Prepare Logs: Ensure you can access the machine’s setup logs, typically in C:\$WINDOWS.~BT\Sources\Panther or C:\Windows\Panther.
- Run SetupDiag:
- Copy SetupDiag.exe to a working directory.
- Open an elevated Command Prompt and navigate to the SetupDiag location.
- Run SetupDiag.exe without parameters to scan the default log locations:
SetupDiag.exe /output:c:\post-install\results.log
- Analyze the Results: SetupDiag generates a results file (e.g., SetupDiagResults.log) in the same directory after processing. This file contains detailed information about the failure, including:
- Error codes
- Failing components
- Recommended actions
Common Error Scenarios
SetupDiag often highlights issues like:
- Driver Incompatibilities: Outdated or incompatible drivers blocking the upgrade.
- Disk Space Issues: Insufficient space on the target partition.
- Pending Updates: Unapplied updates interfering with the upgrade process.
Why Use SetupDiag?
Manually interpreting upgrade logs can be time-consuming and error-prone. SetupDiag simplifies this process, offering clear insights and actionable guidance to resolve issues quickly.
Pro Tip:
Always back up your server before attempting upgrades. If you plan to upgrade critical systems, use SetupDiag preemptively to check for potential blockers.
Incorporating tools like SetupDiag into your upgrade workflow can save hours of frustration and ensure a smoother transition to Windows Server 2022.
In our case, we checked the setupact.log, which was in the logs.zip file generated by setupdiag.exe. We discovered that our issue was that the RAS Connection Manager Administration Kit (CMAK) was installed, and this feature appears to be incompatible with this upgrade. So, we simply removed the feature and tried again.
Here we are removing the Remote Access
Here are the new results with a successful upgrade. Thank you, SetupDiag.exe, for helping me quickly resolve this issue.
Thanks,
Dave