Posted 12 October 2016 - 03:48 PM
I had this same issue in my brand new XA 7.11 site. I could easily have shifted my OS/Office rearming to my sealing script I am using to prep the image, but I wanted to solve the mystery... So here is what I did:
Disabled auto shutdown (from a controller):
Set-ProvServiceConfigurationData -Name ImageManagementPrep_NoAutoShutdown -Value $true
Turned on Machine Identity Service Agent logging in base image:
Set HKLM\SOFTWARE\Citrix\MachineIdentityServiceAgent | Logging=1 (DWORD)
Created a test catalog with this image
When booting up I saw the failure in the C:\image-prep.log file. The log file pointed to "System.Runtime.InteropServices.COMException (0x8007041D). This code is for a service not starting in a timely fashion.
Checked Event Log and sure enough the "Software Protection" service had failed to start because it timed out. This service is crucial to activation related tasks.
The default timeout setting for Windows services is 30000ms (or 30 seconds), so I bumped this up to 180000ms (or 3 minutes) via registry in my base image:
Set HKLM\SYSTEM\CurrentControlSet\Control | ServicesPipeTimeout=180000 (DWORD)
No more Office KMS related failures after doing this. I'd urge anyone who is having this issue to turn on logging and check their image-prep.log file for this issue.