Let’s tie it all together now and test this integration. In Part 1 you learned about vRA 7 to vRO architecture and how we pass data. In Part 2 we created a workflow in vRO that will recieve custom properties from vRA into attributes in vRO to tell vRO workflows how and what you want to automate. In this guide we will finish off the integration in vRA by creating the needed custom properties in our blueprint as well as configuring an event broker subscription.
Let’s create the custom properties on the blueprint first
- Login to the vRA portal as a cloud admin and click the design tab
- Click Blueprints
- Highlight a blueprint you want to modify
- Click edit
Add the custom properties
- Click the machine object
- Click the properties tab
- Click Custom Properties
- Add the following property
- Add the myscript property
- Click Finish
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.MachineProvisioned * myscript echo "Hello World, my ip address is $1" > /helloworld.log
Now let’s add the event subscription to call that vRO workflow we created earlier
- Click the administration Tab
- Click Events
- Click Subscriptions
- Click + New
Create the following conditions
- Select Run based on conditions
- Select All of the following
- Select Data>LifecycleState>Lifecycle State Name Equals VMPSMasterWorkflow32.MachineProvisioned
- Select Data>LifecycleState>State phase Equals POST
- Select Data>Blueprint name equals CentOS7_Test
- Click Next
Monitor the status of the workflow in the vRO client
- Click to highlight the running workflow
- Click the logs tab to view the logs
Check the results in the new VM we provisioned
- Click the items view tab
- Expand out the new deployment
- Get the ip address
Open an SSH or RDP session to the new VM
- Open an ssh session to the IP address
- Login with root or root level user and password
- cd /
- ls
- cat helloworld.log
Pingback: vRA7 to vRO Extensibility Magic Secrets Revealed Part 2 – VMtoCloud.com
Hi Ryan,
great and very usefull demo and explanations, just wondering how you get the helloworld.log working with the
mynewscript = myscript + ” ” + ipaddress in vRO
because if the script you passed in myscript custom property in vRA is equal to
echo “Hello World, my ip address is $1” > /helloworld.log, then the mynewscript is equal to
echo “Hello World, my ip address is $1” > /helloworld.log 192.168.110.200
in your example, so it doesnt work…well
or I missed something like the $1 usage ???
Hi,
I am using $1 as a variable in the script, so when it executes the ip address 192.168.200 is the argument for that variable. So the result in the log should read Hello World, my ip address is 192.168.200 This is just an example of how to pass values around in vRO.
I used the above workflow but replace last action item of the Workflow with Copy file from vco to VM Workflow, its been failing with error unable to read property sdk connection; can you let me know how can I overcome this issue.