Guest OS Customization Specification fails to apply correctly during virtual machine deployment from a template.
search cancel

Guest OS Customization Specification fails to apply correctly during virtual machine deployment from a template.

book

Article ID: 373946

calendar_today

Updated On:

Products

VMware vCenter Server 7.0 VMware vSphere ESXi 8.0 VMware vCenter Server 8.0

Issue/Introduction

During virtual machine deployment, the hostname defined in the Guest OS Customization Specification is not being applied correctly within the guest operating system. Instead of reflecting the expected hostname, the VM is assigned a randomly generated name.

For example, even if the customization specifies the hostname as "Win11VM1", the deployed virtual machine may appear within the guest OS with a different hostname, such as "DESKTOP-XXXX".

However, in Active Directory, the computer object registers with the correct hostname as defined in the customization specification

Upon reviewing the C:\Windows\Panther\setuperr.log, the following errors were found:

YYYY-MM-DDTHH:MM:SS, Error SYSPRP BCD: BiExportStoreAlterationsToEfi failed c000000d
YYYY-MM-DDTHH:MM:SS, Error SYSPRP BCD: Failed to export alterations to firmware. Status: c000000d
YYYY-MM-DDTHH:MM:SS, Error SYSPRP Package Microsoft.Copilot_0.4.2.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
YYYY-MM-DDTHH:MM:SS, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
YYYY-MM-DDTHH:MM:SS, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
YYYY-MM-DDTHH:MM:SS, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
YYYY-MM-DDTHH:MM:SS, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
YYYY-MM-DDTHH:MM:SS, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
YYYY-MM-DDTHH:MM:SS, Error SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
YYYY-MM-DDTHH:MM:SS, Error SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

Environment

VMware vCenter Server 7.x
VMware vCenter Server 8.x
VMware ESXi 7.x
VMware ESXi 8.x



Cause

The error message "SYSPRP Package Microsoft.Copilot_0.4.2.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image" highlights a common issue during Sysprep execution. It arises when a Microsoft Store app such as Copilot in this case is installed only for a single user account rather than provisioned system-wide. Since Sysprep generalize phase requires all applications to be provisioned for every user to create a consistent and reliable deployment image, the process fails when it detects user-specific apps.

 

 

Resolution

  1. Deploy a new VM with required OS configuration without any applications installed and convert it into template.
  2. Apply the guest OS customization (using VM name as hostname) when deploying VM from this template. 
  3. Check whether the VM name is reflecting as hostname within guest OS post deployment.