[SOLVED] opsi-wim-capture - sysprep failing
[SOLVED] opsi-wim-capture - sysprep failing
Hello,
I'm currently trying to create an Windows 10 image via opsi-wim-capture but sysprep is failing.
In the logs I can find the following error messages:
- SYSPRP Encountered error 0x91 while deleting directory '\\?\C:\ProgramData\Microsoft\Windows\AppRepository\...
- SYSPRP Encountered error 0x20 while deleting file '\\?\C:\ProgramData\Microsoft\Windows\AppRepository\...
- SYSPRP Failed to clean the package repository database: 0x80070005.
- SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralize' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x5
- SYSPRP SysprepSession::ExecuteAction: Failed during sysprepModule operation; dwRet = 0x5
- SYSPRP SysprepSession::ExecuteInternal: Error in executing action for Microsoft-Windows-AppX-Sysprep; dwRet = 0x5
- SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x5
- SYSPRP RunPlatformActions:Failed while executing Sysprep session actions; dwRet = 0x5
- SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x5
- SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80070005
- [opsi-wim-capture] Error: sysprep failed
I already tried taking ownership of C:\ProgramData\Microsoft\Windows\AppRepository, changing the permissions and deleting the StateRepository files. (e.g. https://valcesia.com/2019/12/07/sysprep-error/ )
Does anyone here have similar experiences or any idea how to the solve the issue?
Thanks in advance!
Regards,
wildx
I'm currently trying to create an Windows 10 image via opsi-wim-capture but sysprep is failing.
In the logs I can find the following error messages:
- SYSPRP Encountered error 0x91 while deleting directory '\\?\C:\ProgramData\Microsoft\Windows\AppRepository\...
- SYSPRP Encountered error 0x20 while deleting file '\\?\C:\ProgramData\Microsoft\Windows\AppRepository\...
- SYSPRP Failed to clean the package repository database: 0x80070005.
- SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralize' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x5
- SYSPRP SysprepSession::ExecuteAction: Failed during sysprepModule operation; dwRet = 0x5
- SYSPRP SysprepSession::ExecuteInternal: Error in executing action for Microsoft-Windows-AppX-Sysprep; dwRet = 0x5
- SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x5
- SYSPRP RunPlatformActions:Failed while executing Sysprep session actions; dwRet = 0x5
- SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x5
- SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80070005
- [opsi-wim-capture] Error: sysprep failed
I already tried taking ownership of C:\ProgramData\Microsoft\Windows\AppRepository, changing the permissions and deleting the StateRepository files. (e.g. https://valcesia.com/2019/12/07/sysprep-error/ )
Does anyone here have similar experiences or any idea how to the solve the issue?
Thanks in advance!
Regards,
wildx
- SisterOfMercy
- Beiträge: 1524
- Registriert: 22 Jun 2012, 19:18
Re: opsi-wim-capture - sysprep failing
The default question is: what versions of opsi packages have you installed on your server? And what version of opsi-wim-capture is used?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Re: opsi-wim-capture - sysprep failing
Sorry, I forgot to mention that in the original post.
opsi-wim-capture: 4.1.0.1-8
And for the opsi packages:
Is the output from "dpkg -l | grep opsi" enough or where do I get the needed information?
dpkg -l | grep opsi:
ii opsi-directory-connector 31.1-1 all opsi directory connector.
ii opsi-linux-bootimage 20191015-3 all opsi bootimage for netboot tasks.
ii opsi-script:amd64 4.12.1.5-1 amd64 opsi-script for running opsiscript files.
ii opsi-tftpd-hpa 5.2.8-51 amd64 HPA's tftp server
ii opsi-utils 4.1.1.33-2 all utilites for working with opsi.
ii opsi-windows-support 4.1.1-8 all Install utilities useful for deploying Windows with opsi.
ii opsi4ucs 4.1.1.10-1 all opsi software deployment for ucs
ii opsi4ucsappcenter 4.1.1.10 all Installing opsi through the UCS App Center.
ii opsiconfd 4.1.1.20-1 all opsi configuration service
ii opsipxeconfd 4.1.1.17-1 all opsi pxe configuration daemon
ii python-opsi 4.1.1.79-2 all opsi python library
Am I missing some packages?
opsi-wim-capture: 4.1.0.1-8
And for the opsi packages:
Is the output from "dpkg -l | grep opsi" enough or where do I get the needed information?
dpkg -l | grep opsi:
ii opsi-directory-connector 31.1-1 all opsi directory connector.
ii opsi-linux-bootimage 20191015-3 all opsi bootimage for netboot tasks.
ii opsi-script:amd64 4.12.1.5-1 amd64 opsi-script for running opsiscript files.
ii opsi-tftpd-hpa 5.2.8-51 amd64 HPA's tftp server
ii opsi-utils 4.1.1.33-2 all utilites for working with opsi.
ii opsi-windows-support 4.1.1-8 all Install utilities useful for deploying Windows with opsi.
ii opsi4ucs 4.1.1.10-1 all opsi software deployment for ucs
ii opsi4ucsappcenter 4.1.1.10 all Installing opsi through the UCS App Center.
ii opsiconfd 4.1.1.20-1 all opsi configuration service
ii opsipxeconfd 4.1.1.17-1 all opsi pxe configuration daemon
ii python-opsi 4.1.1.79-2 all opsi python library
Am I missing some packages?
- SisterOfMercy
- Beiträge: 1524
- Registriert: 22 Jun 2012, 19:18
Re: opsi-wim-capture - sysprep failing
Most of your packages are slightly older, but not that ancient. And the opsi-wim-capture package is the one from stable. And there have not been any changes recently.
Here I found something that might help:
https://community.spiceworks.com/topic/ ... ows-10-app
I'm not sure if it's an opsi problem, but I also have no experience using wim capture. Do you have a specific usage for it?
Here I found something that might help:
https://community.spiceworks.com/topic/ ... ows-10-app
Code: Alles auswählen
Run these from a recovery command prompt:
del "C:\Program Files\WindowsApps\*.*"
del "C:\ProgramData\Microsoft\Windows\AppRepository\*.*"
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Re: opsi-wim-capture - sysprep failing
I'll have to look if I can find an ISO so I can use the recovery command prompt.
As for the usage:
We are trying to see if UCS and opsi-wim-capture can be used to install our computers.
Since some of the software that we need can't be installed directly via opsi we are now trying opsi-wim-capture.
The computer I'm using is an virtual machine that was installed via opsi (with preserve_winpe_partition = true).
After that I only joined the domain and installed some basic sopftware via opsi to test.
In another virtual machine I also installed windows updates (including creator updates, 20H2, ...) but I'm also getting errors.
As for the usage:
We are trying to see if UCS and opsi-wim-capture can be used to install our computers.
Since some of the software that we need can't be installed directly via opsi we are now trying opsi-wim-capture.
The computer I'm using is an virtual machine that was installed via opsi (with preserve_winpe_partition = true).
After that I only joined the domain and installed some basic sopftware via opsi to test.
In another virtual machine I also installed windows updates (including creator updates, 20H2, ...) but I'm also getting errors.
Re: opsi-wim-capture - sysprep failing
The suggested solution doesn't seem to be pratical from what the person who tried it reported.
To test further I just installed a new virtual machine via OPSI, activated Windows and installed Firefox.
Made a snapshot to go back to and tried to create the image via opsi-wim-capture.
The status in 'opsi config editor' is "failed (setup)" and if I grep the logfile for errors I see the following:
[1] [2020-12-08 14:14:26.885] [] got ScriptErrorMessages: false
[6] [2020-12-08 14:14:30.217] [opsi-wim-capture] ScriptErrorMessages was False is set to false
[7] [2020-12-08 14:14:30.233] [opsi-wim-capture] (created string list $errorList$)
[6] [2020-12-08 14:14:33.715] [opsi-wim-capture] Info: Registry key [HKLM\SOFTWARE\opsi.org\winst\opsi-wim-capture] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[6] [2020-12-08 14:14:47.269] [opsi-wim-capture] Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{d2028e19-82fe-44c6-ad64-51497c97a02a}] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [2020-12-08 14:16:17.673] [opsi-wim-capture] C:\Windows\system32>rem https://social.technet.microsoft.com/Fo ... 014General
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiUpdateEfiEntry failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportBcdObjects failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportStoreAlterationsToEfi failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: Failed to export alterations to firmware. Status: c000000d
[7] [2020-12-08 14:16:39.460] [opsi-wim-capture] (string 8)if ERRORLEVEL 1 goto run64
[6] [2020-12-08 14:16:39.474] [opsi-wim-capture] Set $list$ = addtolist($list$,"if ERRORLEVEL 1 goto run64")
[1] [2020-12-08 14:14:26.885] [] got ScriptErrorMessages: false
[6] [2020-12-08 14:14:30.217] [opsi-wim-capture] ScriptErrorMessages was False is set to false
[7] [2020-12-08 14:14:30.233] [opsi-wim-capture] (created string list $errorList$)
[6] [2020-12-08 14:14:33.715] [opsi-wim-capture] Info: Registry key [HKLM\SOFTWARE\opsi.org\winst\opsi-wim-capture] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[6] [2020-12-08 14:14:47.269] [opsi-wim-capture] Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{d2028e19-82fe-44c6-ad64-51497c97a02a}] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [2020-12-08 14:16:17.673] [opsi-wim-capture] C:\Windows\system32>rem https://social.technet.microsoft.com/Fo ... 014General
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiUpdateEfiEntry failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportBcdObjects failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportStoreAlterationsToEfi failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: Failed to export alterations to firmware. Status: c000000d
[7] [2020-12-08 14:16:39.460] [opsi-wim-capture] (string 8)if ERRORLEVEL 1 goto run64
[6] [2020-12-08 14:16:39.474] [opsi-wim-capture] Set $list$ = addtolist($list$,"if ERRORLEVEL 1 goto run64")
[1] [2020-12-08 14:16:43.169] [opsi-wim-capture] 0 errors
[6] [2020-12-08 14:16:43.170] [] Variable "NumberOfErrors" is keeping its value "0"
[3] [2020-12-08 14:17:58.674] [opsi-wim-capture] gethostname error 11001
[6] [2020-12-08 14:17:58.768] [opsi-wim-capture] ScriptErrorMessages was False is set to true
[6] [2020-12-08 14:17:59.049] [opsi-wim-capture] Set $clonezilla_imagefile$ = GetValueFromIniFile ("c:\opsi\opsi-script-infos.ini","infos","clonezilla_imagefile","Error")
[6] [2020-12-08 14:17:59.049] [opsi-wim-capture] reading the value to the key "clonezilla_imagefile" in section "infos" from inifile "c:\opsi\opsi-script-infos.ini", default value "Error"
[6] [2020-12-08 14:18:09.699] [opsi-wim-capture] Marked error number 2
[3] [2020-12-08 14:20:16.030] [opsi-wim-capture] Error:
[6] [2020-12-08 14:20:16.030] [opsi-wim-capture] errorsOccuredSinceMark > 0 <<< result true
[6] [2020-12-08 14:20:20.324] [opsi-wim-capture] Marked error number 15
[4] [2020-12-08 14:20:20.340] [opsi-wim-capture] Warning: Existing service connection will be reopend. This may cause critical errors. Do not do this, if you are not really sure what you doing.
[6] [2020-12-08 14:20:42.365] [opsi-wim-capture] errorsOccuredSinceMark = 0 <<< result false
[6] [2020-12-08 14:20:46.696] [opsi-wim-capture] Marked error number 17
[4] [2020-12-08 14:20:46.696] [opsi-wim-capture] Warning: Existing service connection will be reopend. This may cause critical errors. Do not do this, if you are not really sure what you doing.
[6] [2020-12-08 14:20:47.487] [opsi-wim-capture] errorsOccuredSinceMark = 0 <<< result true
[7] [2020-12-08 14:20:56.131] [opsi-wim-capture] X:\windows\system32>if ERRORLEVEL 1 goto netfailed
[7] [2020-12-08 14:20:56.147] [opsi-wim-capture] X:\windows\system32>if ERRORLEVEL 1 goto failed
[3] [2020-12-08 14:21:10.235] [opsi-wim-capture] Error: Target is locked via lockfile: p:\win10-x64-captured\opsi-wim-capture.lock
Any other ideas?
To test further I just installed a new virtual machine via OPSI, activated Windows and installed Firefox.
Made a snapshot to go back to and tried to create the image via opsi-wim-capture.
The status in 'opsi config editor' is "failed (setup)" and if I grep the logfile for errors I see the following:
[1] [2020-12-08 14:14:26.885] [] got ScriptErrorMessages: false
[6] [2020-12-08 14:14:30.217] [opsi-wim-capture] ScriptErrorMessages was False is set to false
[7] [2020-12-08 14:14:30.233] [opsi-wim-capture] (created string list $errorList$)
[6] [2020-12-08 14:14:33.715] [opsi-wim-capture] Info: Registry key [HKLM\SOFTWARE\opsi.org\winst\opsi-wim-capture] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[6] [2020-12-08 14:14:47.269] [opsi-wim-capture] Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{d2028e19-82fe-44c6-ad64-51497c97a02a}] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [2020-12-08 14:16:17.673] [opsi-wim-capture] C:\Windows\system32>rem https://social.technet.microsoft.com/Fo ... 014General
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiUpdateEfiEntry failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportBcdObjects failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportStoreAlterationsToEfi failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: Failed to export alterations to firmware. Status: c000000d
[7] [2020-12-08 14:16:39.460] [opsi-wim-capture] (string 8)if ERRORLEVEL 1 goto run64
[6] [2020-12-08 14:16:39.474] [opsi-wim-capture] Set $list$ = addtolist($list$,"if ERRORLEVEL 1 goto run64")
[1] [2020-12-08 14:14:26.885] [] got ScriptErrorMessages: false
[6] [2020-12-08 14:14:30.217] [opsi-wim-capture] ScriptErrorMessages was False is set to false
[7] [2020-12-08 14:14:30.233] [opsi-wim-capture] (created string list $errorList$)
[6] [2020-12-08 14:14:33.715] [opsi-wim-capture] Info: Registry key [HKLM\SOFTWARE\opsi.org\winst\opsi-wim-capture] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[6] [2020-12-08 14:14:47.269] [opsi-wim-capture] Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{d2028e19-82fe-44c6-ad64-51497c97a02a}] could not be opened by RegOpenKeyEx, Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [2020-12-08 14:16:17.673] [opsi-wim-capture] C:\Windows\system32>rem https://social.technet.microsoft.com/Fo ... 014General
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiUpdateEfiEntry failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportBcdObjects failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: BiExportStoreAlterationsToEfi failed c000000d
[7] [2020-12-08 14:16:17.723] [opsi-wim-capture] ==>: 2020-12-08 14:16:12, Error TOOL BCD: Failed to export alterations to firmware. Status: c000000d
[7] [2020-12-08 14:16:39.460] [opsi-wim-capture] (string 8)if ERRORLEVEL 1 goto run64
[6] [2020-12-08 14:16:39.474] [opsi-wim-capture] Set $list$ = addtolist($list$,"if ERRORLEVEL 1 goto run64")
[1] [2020-12-08 14:16:43.169] [opsi-wim-capture] 0 errors
[6] [2020-12-08 14:16:43.170] [] Variable "NumberOfErrors" is keeping its value "0"
[3] [2020-12-08 14:17:58.674] [opsi-wim-capture] gethostname error 11001
[6] [2020-12-08 14:17:58.768] [opsi-wim-capture] ScriptErrorMessages was False is set to true
[6] [2020-12-08 14:17:59.049] [opsi-wim-capture] Set $clonezilla_imagefile$ = GetValueFromIniFile ("c:\opsi\opsi-script-infos.ini","infos","clonezilla_imagefile","Error")
[6] [2020-12-08 14:17:59.049] [opsi-wim-capture] reading the value to the key "clonezilla_imagefile" in section "infos" from inifile "c:\opsi\opsi-script-infos.ini", default value "Error"
[6] [2020-12-08 14:18:09.699] [opsi-wim-capture] Marked error number 2
[3] [2020-12-08 14:20:16.030] [opsi-wim-capture] Error:
[6] [2020-12-08 14:20:16.030] [opsi-wim-capture] errorsOccuredSinceMark > 0 <<< result true
[6] [2020-12-08 14:20:20.324] [opsi-wim-capture] Marked error number 15
[4] [2020-12-08 14:20:20.340] [opsi-wim-capture] Warning: Existing service connection will be reopend. This may cause critical errors. Do not do this, if you are not really sure what you doing.
[6] [2020-12-08 14:20:42.365] [opsi-wim-capture] errorsOccuredSinceMark = 0 <<< result false
[6] [2020-12-08 14:20:46.696] [opsi-wim-capture] Marked error number 17
[4] [2020-12-08 14:20:46.696] [opsi-wim-capture] Warning: Existing service connection will be reopend. This may cause critical errors. Do not do this, if you are not really sure what you doing.
[6] [2020-12-08 14:20:47.487] [opsi-wim-capture] errorsOccuredSinceMark = 0 <<< result true
[7] [2020-12-08 14:20:56.131] [opsi-wim-capture] X:\windows\system32>if ERRORLEVEL 1 goto netfailed
[7] [2020-12-08 14:20:56.147] [opsi-wim-capture] X:\windows\system32>if ERRORLEVEL 1 goto failed
[3] [2020-12-08 14:21:10.235] [opsi-wim-capture] Error: Target is locked via lockfile: p:\win10-x64-captured\opsi-wim-capture.lock
Any other ideas?
Re: opsi-wim-capture - sysprep failing
After checking the error "Error: Target is locked via lockfile: p:\win10-x64-captured\opsi-wim-capture.lock" I realised that there indeed was a .lock file in the target directory (win10-x64-captured).
So i renamed it and tried wim-capture again, this time it finished successfully.
Once I have confirmed that everything is working as wanted I will mark the topic as closed.
So i renamed it and tried wim-capture again, this time it finished successfully.
Once I have confirmed that everything is working as wanted I will mark the topic as closed.
Re: opsi-wim-capture - sysprep failing
Everythings seems to be working but I'm not sure how to mark this as solved.
- SisterOfMercy
- Beiträge: 1524
- Registriert: 22 Jun 2012, 19:18
Re: opsi-wim-capture - sysprep failing
What kind of software is that? Maybe we can help.wildx hat geschrieben:We are trying to see if UCS and opsi-wim-capture can be used to install our computers.
Since some of the software that we need can't be installed directly via opsi we are now trying opsi-wim-capture.
BTW, using [Solved] in front of the title is good enough.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!