Since VMware View 3.0 the View Composer is a component of the View Premier licensing model which helps to reduce the storage usage. The View Composer is available in the View Premier bundle and also in the View Premier Add-On package.
With help of the linked clone technology the View Composer helps to reduce the needed dtorage amount for the virtual desktops from 50 to 90%. More information about the View Composer are available at the VMware web site. You’ll find detailed information also about the Composer functions Refresh, Recompose and Storage Rebalance.
The linked clone technology works with a princip where all linked clones are based on one master image. The clone itself uses the data (OS/Apps) from the master image and stores the difference, the delta in a OS disk which is added to the virtual machine. In comparison to the traditional VDI where every desktops needs a full virtual hard disk drive you get high storage savings when using the composer. The following screenshot from a VMware View presentation shows how the View Composer works:
(Graphic taken from a VMware View Powerpoint presentation)
This article is not about the View Composer, it’s about the Post Syncronisation Script, an option which comes with the Quickprep function. Quickprep helps View to set a hostname for the linked clone, to create an Active Directory Account and also to execute the Post Syncronisation Script. The script is executed whenever a Refresh, recompose or Storage Rebalance function is used and also when the linked clone is created the first time. A detailed description of those functions can be found in the View Composer whitepaper on the VMware website.
Why Post Syncronization Scripts?
After creating a new virtual desktop there can be some task which must be done before a user can work with the new desktop. For example there is a need to do some personalization or to start cleaning tasks or software configuration/installation. The following example describes a real world situation:
The administrator of a VMware View environment has configured the View Composer to save storage and for rapid deployment of the virtual desktops. The company is using a special application which is pre-installed in the master image but needs some personalization before using on each desktop. Every desktops needs to have a unique workstation ID for the application configured in the Windows Registry. This ID will be changed from a VB script executed by the Post Syncronisation Script.
How to configure it?
When creating an automated linked clone desktop pool on the last site of the wizard you’ll be able to set the Quickprep settings. On this site there is also an optionto configure the scripts.
The script can be a batchscript (Bat/CMD) and must be located in the master image of the pool. The correct syntax is: Drive + location + scriptname.bat. i.e. you could use the path: C:\scripts\test.bat, or like seen in the next screenshot C:\postsync.bat.
To test the post syncronisation scripts you could just add the following syntax to your script:
echo postsync > C:\postsync.txt
This script just writes the word "postsync" in the file C:\postsync.txt.
Back to the example of the company above, the postsync.bat must execute a Visual Basic script which will do the changes in the registry. VB scripts can be used with the CSCRIPT.EXE tool within a batch file.