Each component includes the predefined life cycle stages or actions to install, configure, start, update, rollback, and teardown scripts for a service or application component.

The catalog administrator must provide a Bash, Windows CMD, PowerShell, or BeanShell script for at least one of the INSTALL, CONFIGURE, START, UPDATE, ROLLBACK, or TEARDOWN life cycle stages. These scripts are customized to use the component properties.

For example, to deploy an Apache Tomcat server in a virtual machine, you might add the following scripts:


Download the Tomcat server installation bits and install the Tomcat service.


Set the JAVA_OPTS, CATALINA_OPTS, and any other required configuration.


Start the Tomcat service using the start command in the Tomcat server.


Modify the configuration of Tomcat service using the update script or change the cluster size to scale a deployed application and manage the clustered nodes using a load balancer.


Modify the rollback script if the update process of the Tomcat service is unsuccessful because of performance or security problems or the update process is successful but the deployed application has errors.


Modify the teardown script of the Tomcat service for example, to perform specific actions in the application before a deployment is torn down.

The application architect can parameterize the script by declaring, for example, the installer location, installation path, and Tomcat start command as properties in the script. The parameters render the scripts generic. You can deploy the service on different environments without modifying these generic scripts.

You can also modify parameter values from the action script. These modified properties can be referred to as property values for other components. See VMware vCloud Application DirectorCatalog Services guide.

The scripts defined for an action are run in the /tmp/ directory. The Linux script is located at /tmp/runId/ComponentName-LifecycleStageName. The runId is the unique job identifier for each deployment, which is available on the Task Details status window of the deployment summary page. The Windows script is located at \Users\darwin\AppData\Local\Temp.


Verify that no processes are prompting for user interaction when the action script is running. Interruptions pause the script, causing it to remain in an idle state indefinitely, and eventually fail. In addition, if a Windows CMD script exits with a non-zero exit status, the vCloud Application Director agent stops the deployment and marks it as Failed Deployment. Use exit /b 0 to indicate success status and exit /b non-zero for error status.

See Supported Action and Custom Task Scripts.

You can add a service or custom task in an application deployment and define the component action. See Add a Service to the Catalog and Add a Custom Task to the Catalog.