Using custom sysprep.xml for vCenter Guest Customization
search cancel

Using custom sysprep.xml for vCenter Guest Customization

book

Article ID: 336083

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Guest OS is customized successfully when using an imported/customer Sysprep.xml answer file to customize a deployed VM, but the Customization Succeeded event in vCenter Server is not triggered.
  • Customization does not show completed with custom Sysprep.xml answer file.


Environment

VMware vCenter Server 7.0.x

Cause

This issue occurs because the custom Sysprep.xml answer file does not contain the additional commands needed by guestcustutil.exe to finish the Guest Customization operation.

Resolution

Add the RunSynchronousCommand items to the specialize section of the custom sysprep.xml file:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Path>C:\sysprep\guestcustutil.exe restoreMountedDevices</Path>
<Order>1</Order>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Path>C:\sysprep\guestcustutil.exe flagComplete</Path>
<Order>2</Order>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Path>C:\sysprep\guestcustutil.exe deleteContainingFolder</Path>
<Order>3</Order>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
</unattend</FONT>>

Note: If the custom sysprep.xml answer file contains other RunSynchronousCommand items, add the values in order, after the existing RunSynchronousCommand items in the sysprep.xml answer file.

Additional Information

RunSynchronousCommand items are required for Windows customization for Vista and greater if the customization specification has selected Import an existing answer file or paste the contents from an existing file.