Subscribe RSS Feed | Follow on Twitter

Post Syncronization Scripts

with one comment

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.

Similar Posts:

Written by Christoph Harding

April 16th, 2009 at 12:19 am

  • MrBeatnik

    Hi Christoph.
    The last few lines you say “the postsync.bat must execute a Visual Basic script”.

    1) It HAS to be a VB script?

    2) What if I want to run something else – for example I have compiled an EXE. Do I have to:
    - Call the BAT file*.
    - The BAT file calls the VBS.
    - The VBS calls the EXE.

    Can I:
    - Call the BAT file*.
    - The BAT file calls the EXE.

    *The BAT file is defined in the post sync script setting of the Pool

    Seems there is a lot of confusion about the postsync scripts.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.