With the QuickPrep tool, you can create scripts to customize the linked-clone machines in a pool. You can configure QuickPrep to run customization scripts at two predefined times.
When QuickPrep Scripts Run
The post-synchronization script runs after linked clones are created, recomposed, or rebalanced, and the clones' status is Ready. The power-off script runs before linked clones are powered off. The scripts run in the guest operating systems of the linked clones.
How QuickPrep Executes Scripts
The QuickPrep process uses the Windows CreateProcess API call to execute scripts. Your script can invoke any process that can be created with the CreateProcess API. For example, cmd, vbscript, exe, and batch-file processes work with the API.
In particular, QuickPrep passes the path that is specified for the script as the second parameter to the CreateProcess API and sets the first parameter to NULL
.
For example, if the script path is c:\myscript.cmd, the path appears as the second parameter in the function in the View Composer log file: CreateProcess(NULL,c:\myscript.cmd,...).
Providing Paths to QuickPrep Scripts
You provide paths to the QuickPrep customization scripts when you create a linked-clone machine pool or when you edit a pool's guest customization settings. The scripts must reside on the parent virtual machine. You cannot use a UNC path to a network share.
If you use a scripting language that needs an interpreter to execute the script, the script path must start with the interpreter binary.
For example, if you specify the path C:\script\myvb.vbs as a QuickPrep customization script, View Composer Agent cannot execute the script. You must specify a path that starts with the interpreter binary path:
C:\windows\system32\cscript.exe c:\script\myvb.vbs
QuickPrep Script Timeout Limit
View Composer terminates a post-synchronization or power-off script that takes longer than 20 seconds. If your script takes longer than 20 seconds, you can increase the timeout limit. For details, see Increase the Timeout Limit for ClonePrep and QuickPrep Customization Scripts.
Alternatively, you can use your script to launch another script or process that performs the long-running task.
QuickPrep Script Account
QuickPrep runs the scripts under the account under which the VMware View Composer Guest Agent Server service is configured to run. By default, this account is Local System.
Do not change this log on account. If you do, the linked clones do not start.
QuickPrep Process Privileges
For security reasons, certain Windows operating system privileges are removed from the View Composer Guest Agent process that invokes QuickPrep customization scripts.
A QuickPrep customization script cannot perform any action that requires a privilege that is removed from the View Composer Guest Agent process.
The following privileges are removed from the process that invokes QuickPrep scripts:
SeCreateTokenPrivilege SeTakeOwnershipPrivilege SeSecurityPrivilege SeSystemEnvironmentPrivilege SeLoadDriverPrivilege SeSystemtimePrivilege SeUndockPrivilege SeManageVolumePrivilege SeLockMemoryPrivilege SeIncreaseBasePriorityPrivilege SeCreatePermanentPrivilege SeDebugPrivilege SeAuditPrivilege
QuickPrep Script Logs
View Composer logs contain information about QuickPrep script execution. The log records the start and end of execution and logs output or error messages. The log is located in the Windows temp directory:
C:\Windows\Temp\vmware-viewcomposer-ga-new.log