使用 DISM 构建的 Jenkins 随机开始给出错误 50(WINPE 错误)

Jenkins build using DISM randomly started giving ERROR 50 (WINPE error)

我有一个 jenkins 流水线作业,它上周成功构建,这周我开始遇到错误和构建失败。环境没变。

编辑:节点是服务器 2016

jenkins@CIBUILD2 C:\Build\workspace\BC870-OP\Build>REM ******************* D DRIVE *********************************************** 

jenkins@CIBUILD2 C:\Build\workspace\BC870-OP\Build>copy /Z /Y /B \someserver\share\Windows10\BC870\BaseImages\BC870_1.0.0.0_D.wim .\    || goto error 
Access is denied.

Deployment Image Servicing and Management tool
Version: 10.0.17763.1


Error: 50

The request is not supported.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Failed to build image with error 1

复制功能在命令行中运行良好。我相信问题是批处理文件中的下一行是 dism 命令。 mount_d 之前设置为 C:\mount_d 并在另一个包含的批处理脚本中调用 wimfile。

%dism% /MOUNT-WIM /WIMFILE:"%Win10_Base_Image_D%" /INDEX:1 /MOUNTDIR:%mount_d% || goto error

这里是 DISM 日志文件。

2022-01-10 11:23:05, Info                  DISM   PID=4664 TID=2572 Scratch directory set to 'C:\Users\jenkins\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2022-01-10 11:23:05, Info                  DISM   PID=4664 TID=2572 DismCore.dll version: 10.0.17763.1 - CDISMManager::FinalConstruct
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   PID=4664 TID=2572 Successfully loaded the ImageSession at "C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM" - CDISMManager::LoadLocalImageSession
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   DISM Manager: PID=4664 TID=2572 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.14393, Running architecture=amd64, Number of processors=4
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.17763.1
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Executing command line: "C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\dism.exe"  /UNMOUNT-WIM /MOUNTDIR:"c:\mount_c\bc870-op" /DISCARD
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Warning               DISM   DISM Provider Store: PID=4664 TID=2572 Failed to load the provider: C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: SiloedPackageManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: SiloedPackageManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FfuManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: FfuManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: VHDManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
[4664] [0x80070002] FIOReadFileIntoBuffer:(1381): The system cannot find the file specified.
[4664] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[4664] [0xc142011c] WIMGetMountedImageHandle:(2897)
2022-01-10 11:23:05, Info                  DISM   DISM WIM Provider: PID=4664 TID=2572 [c:\mount_c\bc870-op] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2022-01-10 11:23:05, Error                 DISM   DISM WIM Provider: PID=4664 TID=2572 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:2726 - CWimManager::InternalOpUnmount(hr:0x80070032)
2022-01-10 11:23:05, Error                 DISM   DISM WIM Provider: PID=4664 TID=2572 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:4249 - CWimManager::InternalCmdUnmount(hr:0x80070032)
2022-01-10 11:23:05, Error                 DISM   DISM WIM Provider: PID=4664 TID=2572 "Error executing command" - CWimManager::InternalExecuteCmd(hr:0x80070032)
2022-01-10 11:23:05, Error                 DISM   DISM WIM Provider: PID=4664 TID=2572 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:2203 - CWimManager::ExecuteCmdLine(hr:0x80070032)
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: SiloedPackageManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4664 TID=2572 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   PID=4888 TID=2448 Scratch directory set to 'C:\Users\jenkins\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2022-01-10 11:23:05, Info                  DISM   PID=4888 TID=2448 DismCore.dll version: 10.0.17763.1 - CDISMManager::FinalConstruct
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   PID=4888 TID=2448 Successfully loaded the ImageSession at "C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM" - CDISMManager::LoadLocalImageSession
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
2022-01-10 11:23:05, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2022-01-10 11:23:05, Info                  DISM   DISM Manager: PID=4888 TID=2448 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.14393, Running architecture=amd64, Number of processors=4
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.17763.1
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Executing command line: "C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\dism.exe"  /cleanup-wim
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Connecting to the provider located at C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-01-10 11:23:05, Warning               DISM   DISM Provider Store: PID=4888 TID=2448 Failed to load the provider: C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: SiloedPackageManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: SiloedPackageManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FfuManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: FfuManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: VHDManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
[4888] Badly formatted drive string: D:\.  This drive will not be cleaned.
[4888] Badly formatted drive string: E:\.  This drive will not be cleaned.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
2022-01-10 11:23:05, Info                  DISM   DISM.EXE: 
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: SiloedPackageManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2022-01-10 11:23:05, Info                  DISM   DISM Provider Store: PID=4888 TID=2448 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider

我什至都在努力找出导致错误的组件。非常感谢任何帮助。

Jenkins 已停止正确引用网络共享密码凭据。

需要修改管道脚本以重新创建共享连接。