Troubleshoot Sysprep - Amazon Elastic Compute Cloud

Troubleshoot Sysprep

If you experience problems or receive error messages during image preparations, review the following logs. Log location varies depending on whether you are running EC2Config or EC2Launch with Sysprep.

  • %WINDIR%\Panther\Unattendgc (EC2Config and EC2Launch)

  • %WINDIR%\System32\Sysprep\Panther (EC2Config and EC2Launch)

  • C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt (EC2Config only)

  • C:\ProgramData\Amazon\Ec2Config\Logs (EC2Config only)

  • C:\ProgramData\Amazon\EC2-Windows\Launch\Log\EC2Launch.log (EC2Launch only)

If you receive an error message during image preparation with Sysprep, the OS might not be reachable. To review the log files, you must stop the instance, attach its root volume to another healthy instance as a secondary volume, and then review the logs mentioned earlier on the secondary volume. For more information about the purpose of the log files by name, see Windows Setup-Related Log Files in the Microsoft documentation.

If you locate errors in the Unattendgc log file, use the Microsoft Error Lookup Tool to get more details about the error. The following issue reported in the Unattendgc log file is typically the result of one or more corrupted user profiles on the instance:

Error [Shell Unattend] _FindLatestProfile failed (0x80070003) [gle=0x00000003]
		Error [Shell Unattend] CopyProfile failed (0x80070003) [gle=0x00000003]

There are two options for resolving this issue:

Option 1: Use Regedit on the instance to search for the following key. Verify that there are no profile registry keys for a deleted user:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\

Option 2: Edit the EC2Config answer file (C:\Program Files\Amazon\Ec2ConfigService\sysprep2008.xml) and change <CopyProfile>true</CopyProfile> to <CopyProfile>false</CopyProfile>. Run Sysprep again. Note that this configuration change will delete the built-in administrator user profile after Sysprep completes.