Create a custom script and have that script execute at the beginning of vRA Lifecycle Machine Provisioned PRE for a Linux VM.


  1. SovLabs vRA CAFE Endpoint has been created
  2. At least one SovLabs IPAM Profile exists
  3. At least one SovLabs Naming Standard exists

Create LCT EBS

Create the LCT vRA Event Broker Subscription (EBS) using Manage Lifecycle EBS - SovLabs Modules

  1. Login to vRA
  2. Click on the Catalog tab
  3. Request Manage Lifecycle EBS
  4. Submit
Field Value
Action Select Create
Lifecycle Select Machine Provisioned
Priority Type in 1405 (execution order is from lowest to highest)
Timeout Leave at default of 180
Create EBS Screenshot

Create Script Definition

Create a script that will run touch and echo on the provisioned Linux VM

  1. Click on the Catalog tab
  2. Request Add Lifecycle Script Definition
  3. Submit
Field Value
Lifecycle State Select Machine Provisioned
Type Select Provisioned Node
OS Family Select unix
Connection type Select ssh
Create credential? Check the checkbox
Username Provide a username that will have permission on the provisioned VM (e.g. root)
Password Provide the corresponding password
Default EBS Select the EBS created above
Default Order Type in 0 to run first
Interpreter Type in /bin/bash
Script Temporary Directory Leave as default
Script See example script below
Specify success criteria Check the checkbox
Success Exit Code Type in 0
Create Script Definition Screenshot

Example Script

touch /tmp/file_example.txt
echo "some text" > /tmp/file_example.txt
exit 0

Create Lifecycle Profile

Create a Lifecycle Profile for a standard Linux build:

  • Default profiles are selected for SovLabs IPAM and Naming modules
  • The custom script created above is selected to run in Machine Provisioned PRE
  • Default priorities are kept for EBS’, which means that SovLabs modules will run in their default priority in all phases of the VM lifecycle
Field Value
General tab Provide a Configuration label.
Select the appropriate SovLabs vRA CAFE Endpoint.
Leave Ignore SovLabs..? unchecked
Modules and Scripts tab - SovLabs Modules Select the desired IPAM profile from the IPAM dropdown
Select the desired Naming Standard from the Naming dropdown
Modules and Scripts tab - Machine Provisioned PRE Scripts Select the script created in the step above
Machine Building PRE tab Keep defaults
Machine Provisioned PRE tab Keep defaults
Machine Disposing PRE tab Keep defaults
Machine Disposing POST tab Keep defaults
Advanced tab Check the Generate JSON checkbox.

The Lifecycle Component JSON does not need to be edited in simple cases like this one. If there are multiple scripts that need to be in a particular order, then it might be necessary to modify the JSON directly. However, a script’s order can be defined on the Script Definition itself.
General tab Screenshot
Modules & Scripts tab Screenshot
Machine Building PRE tab Screenshot
Machine Provisioned PRE tab Screenshot
Machine Disposing PRE tab Screenshot
Machine Disposing POST tab Screenshot
Advanced tab Screenshot