C:\WINDOWS\Panther\unattend.xml the expected customization settings are visible.C:\WINDOWS\Temp\vmware-imc\guestcust.log file shows that the sysprep command had been passed to the OS by Cloud Director like this example:DEBUG] Executing command C:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\WINDOWS\Panther\unattend.xml
C:\Windows\panther\setuperr.log errors like below are visible:Error SYSPRP BCD: BiUpdateEfiEntry failed c000000dError SYSPRP BCD: BiExportBcdObjects failed c000000dError SYSPRP BCD: BiExportStoreAlterationsToEfi failed c000000dError SYSPRP BCD: Failed to export alterations to firmware. Status: c000000dC:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\WINDOWS\Panther\unattend.xmlVMware Cloud Director 10.6.1
This issue is caused by a Microsoft Windows issue in the sysprep process when using the /generalize option.
This results in incorrect Boot Configuration Data (BCD) settings after the generalize process completes.
The BCD errors indicate that the sysprep process is failing to properly configure the boot settings required for the guest OS.
Once this occurs it can cause any subsequent customization attempts to fail in the OS.
Within Windows, create the following directory if it is not present:
C:\Windows\Setup\Scripts\
Create a file called 'SetupComplete.cmd' in the C:\Windows\Setup\Scripts\ directory.
Note: To learn more about this, you can review the Microsoft documentation here: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-a-custom-script-to-windows-setup?view=windows-11
Edit the file and add the following lines:
bcdedit -set {current} osdevice partition=C:bcdedit -set {current} device partition=C:bcdedit -set {memdiag} device partition=\Device\HarddiskVolume1
Note: The device '\Device\HarddiskVolume1' may be different on your system, but should be the location of the boot drive if you have more than one drive. You may need to look up and identify which one would be correct for your installation.
Save the file.
Power off the VM.
Save the VM as a template to a Cloud Director catalog.
Power on the VM and perform guest customization using the 'Force Customization' button with the desired customization settings applied.
Note: After the first OS boot, the OS should reboot again when sysprep is applying. After the OOBE process the script will run which and overcome the BCD errors.