Hello,
I have a question, I need to run a script inside the machine with the parameter given by the user in the field, can you guide me to the right path (vRA 7.3)?
Regards,
Piotr
The simplest way is if you're using vRA Enterprise. Create a software component that has your script. Create a property which is a variable in that script. Create a custom property and show on the request form. In the blueprint containing this software component, bind the custom property to the software component's property. When the script runs, it'll inherit the value specified in the custom property. Done.
Hello Piotr!
You can use a Event Subscription at the POST state of VMPSMasterWorkflow32.MachineProvisioned and start the vRO Workflow "Run Program in Guest". The Workflow needs an OS User in the VM to run. Or you install the vRA Gugent Agent in the Template (https://open902.com/vra7-gugent-on-windows/).
Regards,
Robert
Hi Robert,
It's the easier part (gugent)
How to pass a parameter to such a script provided by the user in the vm deploy form (/path/script parameter)?
Regards,
Piotr
For Example:
VirtualMachine.Software0.ScriptPath -> c:\scripts\runme.bat {this.is.my.custom.property}
or... you can parse the "c:\VRMGuestAgent\site\workitem.xml" - the agent saves all properties to this xml file.
The simplest way is if you're using vRA Enterprise. Create a software component that has your script. Create a property which is a variable in that script. Create a custom property and show on the request form. In the blueprint containing this software component, bind the custom property to the software component's property. When the script runs, it'll inherit the value specified in the custom property. Done.
The solution works very well 🙂
I also helped:http://www.vmtocloud.com/how-to-use-drop-down-lists-with-vra-software-components/
Thank you, colleagues!
Piotr