Hello,
I would like to pass the VM Custom properties from VRA. For example, lets say I have a Catalog item which requests a VCO Deployment. VCO VM has custom parameters like "vami.hostname" etc. How can I pass these parameters from VCAC?
Thanks,
Pankaj
You can pass a custom property from the blueprint or add a build profile. Custom Options for vRealize Automation Server Requests | theITHollow
Thanks for the response.
I am able to get the property in VRO Workflow but then I try to set the property on the VM using "Create/Update Property on VCAC VM", I can see the property update in log -
[2015-08-18 20:43:22.028] [I] Create property vami.hostname : HelloWorld on virtualMachine entity linux09
but the update does not happen on the VM. I have tried VirtualMachine.vami.hostname and vami.hostname for the property name, but no luck.
Please let me know what shall I use as the Property name.
Are you just trying to extract the hostname in vRO?
If so there are a couple of ways to do this:
First:
the best method would be to declare a variable to vm.name, where vm = the VC:Virtual MAchine object.
For instance If I wanted to pass the string variable of computer name to a script of something in the vRO workflow that expected the machine name in a string format,
I would have an Input Attribute of vm that is set to VC:VirtualMachine
then I would declare a variable: vmName = vm.name;
I would also use a System.log("VM Name is " + vmName); To make sure its returning the proper value. vmName would be a input attribute so I could use it throughout the workflow.
Second:
If I want to extract a custom property from vRA - most of my workflows have a scriptable task placed at the beginning to extract vRA custom property values
The code looks something like this:
Here you can see I'm extracting a reserved custom property 'hostname' and a custom property I created: DLA.ApplicationGroup. This uses the virtualMachineProgerties.get function.
Thanks vjDUBB for response.
Here is my very simple scenario. I have a VM on which I define some properties say "Master Server Address". I can set these properties when I deploy them from vCenter Web Client or OVFTool.
I can create the blue print properties and create "Master Server Address", so when the user creates the machine by requesting a catalog item, user along with it has passed "Master Server Address". I would this to be applied to the Virtual Machine OVF property that I have created. When the machine powers on, I would like to get this value by using scripts like vmtoolsd --cmd "info-get guestinfo.ovfEnv"
Please let me know if I can set the properties directly on the Virtual Machine or will I need to call a Script like from Linux Guest Agent.