Quantcast
Channel: VMware Communities : All Content - vRealize Automation Tools
Viewing all articles
Browse latest Browse all 9859

vRA 7.2 Pass custom property to Guest Agent

$
0
0

Hi,

I'm trying to pass some custom properties into guest agent in vRA 7.2.

 

I found it's very straightforward at first, based on this document. I put the following properties into a property group and assign to my test blueprint.

Vrm.DataCenter.Location = ABC

VirtualMachine.Admin.UseGuesetAgent = true

VirtualMachine.Customize.WaitComplete = true

VirtualMachine.Software0.Name = Download Test Script

VirtualMachine.Software0.ScriptPath = /bin/curl --output /tmp/test.sh http://xxx.xxx.xxx.xxx/test.sh

VirtualMachine.Software1.Name = Execute Test Script

VirtualMachine.Software1.ScriptPath = /tmp/test.sh {Vrm.DataCenter.Location}

 

The test.sh script is basically take input argument, put it into a temp file:

#!/bin/bash

/bin/echo $1 > /tmp/test.txt

 

After my request succeed, I checked /tmp/test.txt, the content is:

{Vrm.DataCenter.Location}

 

I was expect see ABC in the file.

 

Then I checked the workitem.xml file under /usr/share/gugent/site, the content is all lower case:

<property name="virtualmachine.software1.scriptpath" value="/tmp/test.sh {Vrm.DataCenter.Location}"/>

<property name="vrm.datacenter.location" value="ABC"/>

 

Then I changed the value of my argument for VirtualMachine.Software1.ScriptPath to:

VirtualMachine.Software1.ScriptPath = /tmp/test.sh {vrm.datacenter.location}

 

Then I got the lower case variable name in my file:

{Vrm.DataCenter.Location}

 

 

Is there anyone having the same issue? Or I am missing some step to turn on the elevator?

 

I have trying different thing, but none of them worked. I am stuck on this for a whole day now. Any feedback would be greatly appreciated!


Viewing all articles
Browse latest Browse all 9859

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>