Problem Definition:


When attempting to Customize a virtual machine that was created by copying (cloning) an existing virtual machine, the new virtual machine Computer Name is not applied, and the computer is not joined to the domain.  The SID is also not changed.


The following error is logged in c:\windows\system32\sysprep\panther\SetupErr.log


<Date> <Time>, Error SYSPRP Package <PackageFullName> was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
<Date> <Time>, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
<Date> <Time>, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
<Date> <Time>, Error [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralize' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP ActionPlatform::ExecuteAction: Error in executing action; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP ActionPlatform::ExecuteActionList: Error in execute actions; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0x3cf2
<Date> <Time>, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
<Date> <Time>, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80073cf2



Cause:


This is due to duplicate appx packages entries.  This can be caused by a previous operating system in-place upgrade.


Resolution:


If no longer needed, delete the user profiles except for the administrator profiles located at c:\users, and delete their corresponding profile registry keys located at HKLM\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList

 

Check to see if the following registry items exist.  If they do backup and then delete them:

HKLM\System\Setup

Delete the REG_DWORD named "Upgrade"


HKLM\System\Setup\Upgrade

Delete this entire key


Boot into Windows recovery options by tapping F8, and select "Repair your Computer."  Choose Command Prompt.

change directory to the operating system volume (typically the D: or E: drive in the recovery environment).  Change Directory to %ProgramData%\Microsoft\Windows\AppRepository


Rename StateRepository-Machine.srd to StateRepository-Machine.bak and StateRepository-Deployment.srd to StateRepository-Deployment.bak


Exit the command prompt, shutdown the computer.  Reapply the Guest OS Customization settings.  Then choose "Power On and Force Customization."  Guest Customization (sysprep) will now complete successfully.


Additional Information: