This Sysprep error is often related to Windows Update and your Reference VM. It is caused by Windows Updates getting stuck in the Reserved Storage.
If you are receive this specific Sysprep error, "Sysprep was not able to validate your Windows installation," while deploying an image, please try the following steps.
- Start the virtual reference machine and run Windows Updates. Install all updates (Quality and Security updates only - do not install any Feature Updates/in-place upgrades which change the OS version).
- Restart the virtual reference machine via the Start menu.
- Log into Windows, open Windows Update and select Pause Updates.
- Restart the virtual reference machine one more time via the Start menu.
- Log into Windows, open the Microsoft Store and click Library in the lower-right corner. Install any available updates by clicking Get updates.
- Open Windows Update, resume updates, and then check for updates one more time. If any updates are found, restart and repeat this step until all updates are installed and Windows Update shows that You're up to date.
- Open an administrative command prompt and run this command to gracefully shutdown the VM:
shutdown.exe /s /t 0
- Retry capture and deployment.
Unfortunately, we have observed cases where the steps above do not fully clear out the Reserved Storage. This is a fault in the Windows OS, and there is unfortunately nothing that can be done to fix it. If this occurs, you will need to create a new reference VM, and - as a first step - disable the use of the Reserved Storage in the registry.
To do this, follow these steps:
- Create your new virtual reference machine, install Windows, proceed through the Out-of-Box Experience, and immediately open regedit.
- Browse to HKLM\Software\Microsoft\Windows\CurrentVersion\ReserveManager
- Double-click the ShippedWithReserves key, and change its value from 1 to 0.
- Finish building your VM in accordance with our best practices, then gracefully shutdown and capture the VM, and retry deployment.
Note that this registry fix is intended to be applied before Reserved Storage is ever used by the operating system to install updates. It will not resolve the issue for a reference VM which already has items stuck in Reserved Storage which cannot be resolved by re-running updates. At deployment time, Sysprep will change the value of the ShippedWithReserves key back to its default, so Reserved Storage will behave normally on any deployed endpoints which receive this image.