Plain Windows 2016 DataCenter builder via Packer 1.4.4.
Not using any agents in Azure using Azure ARM
{ "type": "powershell", "inline": [ "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State |Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 30 } else { break } }" ] }
Below is what I see:
2020-06-01 04:10:46, Info [0x0f00ac] SYSPRP WinMain:Processing 'cleanup' external provider request. 2020-06-01 04:10:46, Info
[0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 3 2020-06-01 04:10:46, Info [0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Cleanup 2020-06-01 04:10:46, Info [0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Cleanup\3DF6F0C2-A3BA-11EA-A80E-000D3A8B6877; will try to launch 'DscCore.dll,SysPrep_Cleanup' 2020-06-01 04:10:47, Info [0x0f0080] SYSPRP LaunchDll:Found 'DscCore.dll,SysPrep_Cleanup'; executing it 2020-06-01 04:10:47, Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'DscCore.dll,SysPrep_Cleanup', returned error code 0x2 2020-06-01 04:10:47, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x2[gle=0x00000006] 2020-06-01 04:10:47, Error
[0x0f00ae] SYSPRP WinMain:Hit failure while processing sysprep cleanup external providers; hr = 0x80070002[gle=0x00000006]
There are no other errors in the setuperr.log other than the original error from the Microsoft itself. Which is as follows:
2020-05-06 12:19:25, Error SYSPRP setupdigetclassdevs failed with error 0 2020-05-06 12:19:25, Error SYSPRP MRTGeneralize:107 - ERROR: Failed DeleteInstance AntiSpywareProduct.instanceGuid="{D68DDC3A-831F-4FAE-9E44-DA132C1ACF46}" hr=2147749904 2020-05-06 12:19:25, Error SYSPRP MRTGeneralize:116 - ERROR: Failed DeleteInstance AntiVirusProduct.instanceGuid="{D68DDC3A-831F-4FAE-9E44-DA132C1ACF46}" hr=2147749904
Any one else encountering a similar error, please let me know. But looking for resolution
User contributions licensed under CC BY-SA 3.0