I recently experienced problems when reusing AutoUnattend.xml, after having upgraded the Windows image:
From: Windows 10 Enterprise 2015 LTSB
To: Windows 10 Enterprise 2016 LTSB
The unattended installation would start and run, but eventually failed with:
Windows could not apply unattend settings during pass [offlineServicing].
Examined the installation logfiles under:
setuperr.log only contained:
2016-10-20 15:20:20, Error [0x0606ae] IBS [SetupCl library] Required profile hive does not exist: [\??\D:\WINDOWS\system32\config\systemprofile\NTUSER.DAT]. 2016-10-20 15:20:37, Error [0x0604a7] IBS InstantiateCBSUnattendPass: dism.exe returned with failing exit code -2146498555 2016-10-20 15:20:37, Error [0x060431] IBS Callback_UnattendInitiatePass: An error occurred while initiating unattend passes; hr = 0x80004005
setupact.log contained no additional useful information.
However cbs_unattend.log contained an explanation:
2016-10-20 15:20:36, Error DISM DISM Package Manager: PID=2348 TID=2368 Failed opening package Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.10240.16384. - CDISMPackageManager::Internal_CreatePackageByName(hr:0x800f0805) 2016-10-20 15:20:36, Error DISM DISM Package Manager: PID=2348 TID=2368 Failed to get the underlying cbs package. - CDISMPackageManager::OpenPackageByName(hr:0x800f0805) 2016-10-20 15:20:36, Error DISM DISM Package Manager: PID=2348 TID=2368 The specified package is not valid Windows package. - GetCbsErrorMsg
I wondered why the Microsoft-Windows-Foundation-Package could not be opened, so I went back to Windows System Image Manager.
There I noticed that the package was unknown, because the version numbers had changed.
Be aware that I had run: Tools -> Validate Answer File
(Which did not show warnings about this)
Added the new Microsoft-Windows-Foundation-Package
Then copied all the settings
After verifying that all settings had been copied, I deleted the unknown package.
(It would probably have been easier to update the version number in AutoUnattend.xml, which I recommend trying first)
Then ran: Tools -> Validate Answer File
Which now showed these warnings:
Windows Feature is enabled but one or more of its dependencies have not been enabled in the answer file. Packages/Foundation/amd64_Microsoft-Windows-Foundation-Package_10.0.14393.0__31bf3856ad364e35_/Client-DeviceLockdown/Client-EmbeddedBootExp Packages/Foundation/amd64_Microsoft-Windows-Foundation-Package_10.0.14393.0__31bf3856ad364e35_/Client-DeviceLockdown/Client-EmbeddedLogon Packages/Foundation/amd64_Microsoft-Windows-Foundation-Package_10.0.14393.0__31bf3856ad364e35_/Client-DeviceLockdown/Client-EmbeddedShellLauncher
I was challenged by this until I found the answer here:
I had to right-click the feature in question and choose: Enable Parent Features
After making these changes new configuration sets / deployment images could be installed successfully.
When reusing AutoUnattend.xml with a new Windows image, please look for unknown packages in Windows SIM in addition to validating the answer file.
If any unknown packages are found, please update the version numbers in AutoUnattend.xml.