Mar 202013

If you are implementing a VMware View environment in combination with Appsense DesktopNow the following ugly picture could be seen in the AppSense Management Console:


In a VMware View implementation you install your AppSense Agents in the so called “Golden Image”. When deploying the desktop we saw this picture above. The configuration files did not download directly after boot of the VDI-desktop. The main cause of this is the default 60 minute poll time of the CCA-client.

Note that it`s always the client that is contacting the server, so increasing or decreasing the Poll-time is only effecting the client. Only when there is a poll from the client to the server, the new poll time you set in the AppSense Management Center console is updated on the client. The Golden Image is not a member of any deployment group in the AppSense Management Center and has no knowledge of the settings you provided there for your clients. It is using the default of 60 minutes provided with the install of the client.

The client poll-time is default 60 minutes, so when the CCA poll fails the first time due to the VDI-deployment process the next poll would be to late and users logging on are presented a desktop without the AppSense configuration. This solution also works for the Application manager and Performance manager configuration.

You can adjust the client Poll time trough this registry key in the Golden Image:

[HKEY_LOCAL_MACHINE\SOFTWARE\AppSense Technologies\Communications Agent]
"event poll"=dword:0000003c

I adjusted it to 30 seconds. Do not adjust it to anything less then 30 seconds.  This is the lowest value possible, less will cause Windows boot problems in various ways.

In our case this did not solve the problem entirely. More VDI-desktops where “green” in the deployment console but only for 70% of all VDI-desktops. The solution for this is to trigger the CCA client to download the configuration files through start the CCA-service after boot. This is done in the following way:

  1. Add a script to your Golden Image for starting the CCA-service. For example,  %PROGRAMFILES%\Scripts\postinstall.cmd.
    @echo off
    :: Start the AppSense Client Communications Agent and set it to start automatically
    sc start "AppSense Client Communications Agent"
    sc config "AppSense Client Communications Agent" start= auto
  2. Start this script with the “Post Synchronization script” option in your VMware View manager. 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 option to configure the scripts.
  3. To prevent a timeout that could occur when running this post installation script adjust the timeout value from 20 to 40 seconds.

    With the default 20 seconds, you could see this error in the VMware composer log file “%system_drive%\Windows\Temp\vmware-viewcomposer-ga-new.log”

    Running the PostSync script: "script path\name" with timeout: 2000
    RunSCript: Unable to execute script: 0059A3A8 , error = 2
    Failed to run PostSyncSCript:  "Script path\name" Unable to......
  4. In the Golden Image, set the AppSense Client Communications Agent service to “manual” en stop the service before deploying the linked clone. We created a Golden Image closing script that included these two commands:
    sc stop "AppSense Client Communications Agent"
    sc config "AppSense Client Communications Agent" start= demand
  5. This should do it…. Or if you where as suspicious as me,  go on and follow the next stepts to built in an extra fail-safe:This will create a script that is triggered to run 2 minutes after boot,  checks if the “configuration.aemp” exists and if not restarts the AppSense Client Communications Agent service. This will trigger a poll to the server and download the configuration file.
  6. Create a script for example,  %PROGRAMFILES%\Scripts\ccarestart.cmd
    @echo off
    IF NOT EXIST "%programdata%\AppSense\Environment Manager\configuration.aemp" (
    sc stop "AppSense Client Communications Agent"
    sc start "AppSense Client Communications Agent"
  7. In the Golden Image, create a new Task en adjust the following settings.
    • General
      • Use a domain account with local administrator rights to run the task.
      • Run whether user is logged on or not
      • Run with highest privileges
    • Trigger
      • Begin the task: At startup
      • Delay task for: 2 minutes
      • Enabled
    • Actions
      • Run the script “%PROGRAMFILES%\Scripts\ccarestart.cmd”.
    • Conditions
      • deselect all
    • Settings
      • Leave all default



 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>