question

JosephRapoport-0932 avatar image
0 Votes"
JosephRapoport-0932 asked ErikMetzler-8217 published

DISM Not finding source

I am having some difficulty with DISM, and it appears that nothing that I do will resolve the issue.
I confirmed that the server in question and the image that I am using for the WIM repair are of the same build - 14393.4169 however every time I run DISM it fails with an error indicating that it cannot find the source.
The source is mounted as E: and is the Windows Server 2016 Standard x64 ISO evaluation downloaded directly from Microsoft.
======
C:\Windows\system32>dism.exe /online /cleanup-image /restorehealth /Source:E:\Sources\install.wim:1

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

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

C:\Windows\system32>dism.exe /online /cleanup-image /restorehealth /Source:E:\Sources\install.wim:1 /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

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

C:\Windows\system32>dism.exe /online /cleanup-image /restorehealth /Source:E:\Sources\install.wim /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

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


The DISM log is showing the same error.
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f081f)
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 Failed processing package changes with session option CbsSessionOptionRepairStoreCorruption - CDISMPackageManager::RestoreHealth(hr:0x800f081f)
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 Failed to restore the image health. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f081f)
2021-02-11 07:50:00, Error DISM DISM Package Manager: PID=5520 TID=9676 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f)

If you look up above at the syntax of my DISM, I am using the /source option. What the heck, Microsoft?
Anyone else run into this?
I could use some assistance.

Thanks,
Joseph

windows-server-2016
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered

I've had some "fun" with DISM on Win10 recently so maybe this will help you....

I downloaded Windows Server 2016 Standard x64.ISO and ran this:

dism /Get-WimInfo /WimFile:D:\sources\install.wim

It shows:

Details for image : D:\sources\install.wim
Index : 1
Name : Windows Server 2016 Standard Evaluation
Description : This option (recommended) reduces management and servicing by installing only what is needed to run most server roles and applications. It does not include a GUI, but you can fully manage the server locally or remotely with Windows PowerShell or other tools. For more details see "Windows Server Installation Options."
Size : 9,235,873,810 bytes
Index : 2
Name : Windows Server 2016 Standard Evaluation (Desktop Experience)
Description : This option is useful when a GUI is required—for example, to provide backward compatibility for an application that cannot be run on a Server Core installation. All server roles and features are supported. For more details see "Windows Server Installation Options."
Size : 15,305,218,110 bytes
Index : 3
Name : Windows Server 2016 Datacenter Evaluation
Description : This option (recommended) reduces management and servicing by installing only what is needed to run most server roles and applications. It does not include a GUI, but you can fully manage the server locally or remotely with Windows PowerShell or other tools. For more details see "Windows Server Installation Options."
Size : 9,234,074,002 bytes
Index : 4
Name : Windows Server 2016 Datacenter Evaluation (Desktop Experience)
Description : This option is useful when a GUI is required—for example, to provide backward compatibility for an application that cannot be run on a Server Core installation. All server roles and features are supported. For more details see "Windows Server Installation Options."
Size : 15,316,399,667 bytes


The (Desktop Experience) caught my attention. It looks to me that "install.wim:1" is server core. Have you tried using "/Source:E:\Sources\install.wim:2"?

I had a Win10 Pro VM that I play with and somehow got mangled up. I eventually got /RestoreHealth to not error out (I think it worked!) by sharing out C:\Windows from my laptop which was the same patch level and using "/source:\\MyLaptop\windows". If you have another server, you could try that.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DaleKudusi-MSFT avatar image
0 Votes"
DaleKudusi-MSFT answered

Hi,
You could try the following methods:
Method 1

  1. Type Dism.exe /online /Cleanup-Image /StartComponentCleanup and press Enter in elevated command prompt.

  2. Then you can retry running Dism /Online /Cleanup-Image /RestoreHealth command.

Method 2

  1. Locate Windows OS ISO file in File Explorer and right click, select Mount.

  2. Type following commands one-by -one and press Enter key after each:
    diskpart
    list volume
    exit

  3. After executing these commands, you have to identify correct drive letter on which Windows ISO file is mounted. Then run this final command:
    4.Then run this final command: DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:X:\Sources\Install.wim:1 /LimitAccess

  4. You’ve now redirected DISM to mounted Windows ISO file. Hence, you can now run DISM command i.e. Dism /Online /Cleanup-Image /RestoreHealth and it should work.

Best regards.


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JosephRapoport-0932 avatar image
0 Votes"
JosephRapoport-0932 answered

MotoX80 and Dale,

Thank you for your responses.
I started with Dale's suggestions.
I tried option 1 and received an error.

C:\Windows\system32>dism.exe /online /cleanup-image /StartComponentCleanup

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]

Error: 2

The system cannot find the file specified.

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

I started looking at option 2.
DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D DVD-ROM 0 B No Media
Volume 1 E SSS_X64FREE UDF DVD-ROM 6649 MB Healthy
Volume 2 C NTFS Partition 126 GB Healthy Boot
Volume 3 Recovery NTFS Partition 450 MB Healthy Hidden
Volume 4 FAT32 Partition 99 MB Healthy System

As above in the initial post, I was called the ISO on the E: drive.
Ran: dism.exe /online /cleanup-image /restorehealth /source:WIM:E:\sources\install.wim:1 /LimitAccess
The result was unfortunately the same.
C:\Windows\system32>dism.exe /online /cleanup-image /restorehealth /source:WIM:E:\sources\install.wim:1 /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

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

So neither of Dale's options to try worked. Any other ideas Dale?


Next I looked at MotoX80's suggestion and it resulted in the same output.
C:\Windows\system32>dism.exe /online /cleanup-image /restorehealth /source:WIM:E:\sources\install.wim:2 /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

[==========================100.0%==========================]
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

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

So, we are back to any ideas to resolve this issue?
It is possible to separately mount the WIM file and then use that as the source instead of using the mounted ISO of the Windows Server 2016 disc?

Thanks,
Joseph

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered

Try this.

 md C:\test\offline 
 DISM.exe /Mount-Wim /WimFile:e:\sources\install.wim /index:2 /MountDir:C:\test\offline /ReadOnly
 Dism.exe /Online /Cleanup-Image /restoreHealth /source:C:\test\offline /loglevel:4

When you are done.

 DISM.exe /Unmount-Wim /MountDir:C:\test\offline /discard

I added the loglevel in the hope that if it fails again, there might be something useful in C:\WINDOWS\Logs\DISM\dism.log


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SreekanthKrishnan-8066 avatar image
0 Votes"
SreekanthKrishnan-8066 answered

@JosephRapoport-0932
Can you confirm if the issue resolved with MotoX80's advice
I am on the same boat
md C:\test\offline
DISM.exe /Mount-Wim /WimFile:e:\sources\install.wim /index:2 /MountDir:C:\test\offline /ReadOnly
Dism.exe /Online /Cleanup-Image /restoreHealth /source:C:\test\offline /loglevel:4

When you are done.

DISM.exe /Unmount-Wim /MountDir:C:\test\offline /discard

I added the loglevel in the hope that if it fails again, there might be something useful in C:\WINDOWS\Logs\DISM\dism.log

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErikMetzler-8217 avatar image
0 Votes"
ErikMetzler-8217 answered

This failed for me with

Error: 14

Not enough storage is available to complete this operation.

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

Plenty of space on the C drive, and plenty of RAM. So. Unclear why it failed.


And this seems pertinent from %WINDIR%\logs\CBS\cbs.log


Checking System Update Readiness.

(p) CSI Payload Corrupt amd64_microsoft-windows-t..-licensingadminpack_31bf3856ad364e35_10.0.14393.2515_none_b9d230ab0a3952a7\RD Licensing Manager.lnk
Repair failed: Missing replacement payload.
(p) CSI Payload Corrupt amd64_microsoft-windows-t..tion-snapin-nonmsil_31bf3856ad364e35_10.0.14393.4046_none_8ea1960065bd174d\Remote Desktop Licensing Diagnosis.lnk
Repair failed: Missing replacement payload.

Summary:
Operation: Detect and Repair
Operation result: 0x8007000e
Last Successful Step: Entire operation completes.
Total Detected Corruption: 2
CBS Manifest Corruption: 0
CBS Metadata Corruption: 0
CSI Manifest Corruption: 0
CSI Metadata Corruption: 0
CSI Payload Corruption: 2
Total Repaired Corruption: 0
CBS Manifest Repaired: 0
CSI Manifest Repaired: 0
CSI Payload Repaired: 0
CSI Store Metadata refreshed: True

Total Operation Time: 764 seconds.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeanDiLella-9888 avatar image
0 Votes"
SeanDiLella-9888 answered SeanDiLella-9888 published

I am having this exact issue with 2 separate servers. 1 is a 2016 and the other a 2019 os. Going to try Motox method and report back shortly

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErikMetzler-8217 avatar image
0 Votes"
ErikMetzler-8217 answered ErikMetzler-8217 published

I have not been able to fully automate, but the MotoX solution is as best I can tell the way to go. It may still fail, but it gets you most of the way there. Then, go into the CBS log and determine the items it cannot repair. For me it's always just link files. especially for DNS manager snapin. Only 1-2 items in total. Then if you have another good server of the same version, get the link from them and replace. This has gotten my 2016 servers to stop complaining on SFC scans.

Also, some powershell to make life easier.

 # Obtain ISO from Microsoft at https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016/
 # https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO
 # https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso
    
 #Determine 2016 or 2019 and set the download path
 $VersionData = (Get-WMIObject win32_operatingsystem).name 
 Write-Host "OS is $VersionData"
 #Set the download Path
 if ($VersionData -like "*2019*")
 {
     #2019 Disk
     Write-Host "Download for Server 2019"
     $DownloadPath = "https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
    
 } elseif ($VersionData -like "*2016*")
 {
    #2016 Disk
    Write-Host "Download for Server 2016"
    $DownloadPath = "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
    
 } else 
 {
     Write-Error ("The OS $VersionData is not supported by this script.")
     exit
 }
    
 #create the folder as needed
 if (!(Test-Path c:\temp)) {
     Write-Host "Creating c:\temp"
     New-Item c:\temp -ItemType directory
 }
    
 #Download the file if needed.
 $isoPath="C:\Temp\Server.iso"
 if (!(Test-Path $isoPath -PathType Leaf))
 {
     Write-Host "Downloading from $DownloadPath"
     #I prefer BITS, but we'll live with this for now. I've had BITS broken on systems that need repair.
     try {
     #    Start-BitsTransfer $DownloadPath $isoPath
    
         $wc = New-Object net.webclient;
         $wc.Downloadfile($DownloadPath, $isoPath)
     
     } catch {
         Write-Error "Unable to download file from $DownloadPath"
         exit
     }
 } else {
     Write-Host "ISO is present from previous runs."
 }
 # Perform Windows Repair using Windows ISO as the source (works better):
    
 # Specify ISO Path
    
 try {
     $isoMount=Mount-DiskImage $isoPath -PassThru
     $driveLetter=($isoMount | get-volume).DriveLetter
     $wimPath="$driveLetter`:\sources\install.wim:2"
     Write-Host "wimPath: $wimPath"
     #$logPath="C:\Temp\dism-repair-windows.log"
 } catch {
     Write-Error "Unable to mount image."
     exit
 }
    
 if ($VersionData -like "*2016*")
 {
     if (!(Test-Path C:\temp\offline)){
         md C:\temp\offline
     }
        
     DISM.exe /Mount-Wim /WimFile:"$driveletter`:\sources\install.wim" /index:2 /MountDir:C:\temp\offline /ReadOnly
     Dism.exe /Online /Cleanup-Image /restoreHealth /source:C:\temp\offline /loglevel:4
     DISM.exe /Unmount-Wim /MountDir:C:\temp\offline /discard
 } else
 {
     # Restore Windows Health using provided ISO:
     dism /online /cleanup-image /restorehealth /source:WIM:$wimPath /limitaccess # non-native PowerShell command
     # Repair-WindowsImage -Online -RestoreHealth -Source $wimPath -LimitAccess -LogPath $logPath
 }
    
    
 # Dismount ISO when done
 try {
     Dismount-DiskImage -ImagePath $isoPath
     } catch {
     Write-Error "Unable to unmount image."
     exit
 }
    
 <#
 #delete the ISO (Uncomment to clean up instead)
 try {
     Remove-Item $isoPath
     } catch {
     Write-Error "Unable to delete the image"
     exit
     }
    
 #>
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.