Guest OS Customization doesn't work due to Windows Sysprep fails with Sysprep_Clean_Validate_Opk error.
search cancel

Guest OS Customization doesn't work due to Windows Sysprep fails with Sysprep_Clean_Validate_Opk error.

book

Article ID: 313408

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

Guest OS Customization doesn't take effect.

  • In the %WINDIR%\temp\toolsDeployPkg.log file, there is no further log after network interfaces are connected.
[DEBUG] Executing command C:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\sysprep\sysprep.xml
[DEBUG] Successfully executed command C:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\sysprep\sysprep.xml
[DEBUG] Trying to connect network interfaces, attempt 1
[INFO] The network interfaces are connected on 1 second
[INFO] GuestCustUtil exiting.

 

  • In the %WINDIR%\System32\Sysprep\Panther\setupact.log, a Sysprep_Clean_Validate_Opk error is reported. The logs could be:
Error                 SYSPRP Sysprep_Clean_Validate_Opk: Audit mode can't be turned on if there is an active scenario.; hr = 0x800F0975
OR
Error                 SYSPRP Sysprep_Clean_Validate_Opk:Failed to query pending CBS operations; hr = 0x800706b5[gle=0x000003f0]
OR
Error                 SYSPRP Sysprep_Clean_Validate_Opk: Audit mode cannot be turned on if reserved storage is in use. An update or servicing operation may be using reserved storage.; hr = 0x800F0975


Environment

VMware vCenter Server 7.0.x
VMware vCenter Server 6.0.x

Cause

Guest OS customization uses Windows Sysprep to apply the configuration. A proceeding Windows Update will cause some Sysprep pre-validing errors and fail to run.

Resolution

To resolve the issue, please follow the below mentioned steps:
Option 1:

From Settings -> Windows Update, click “Check for updates”, install all available Windows updates till the OS is up to date.

Option 2:

  1. From Settings -> Windows Update, click “Pause updates” and select “Pause for 1 week”.

  2. If there is error message "Audit mode cannot be turned on if reserved storage is in use" in %WINDIR%\System32\Sysprep\Panther\setupact.log file, apply below 2 configurations:

a. Open "Registry Editor", navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" and change "ActiveScenario" to value 0.

b. Run command "DISM.exe /Online /Set-ReservedStorageState /State:Disabled" to disable Reserved Storage.