Scripting
Browse by topic
-

Managing vSphere VM Advanced Configuration Parameters with Orchestrator
Use Orchestrator to read and set vSphere VM advanced configuration parameters (extraConfig), even on powered-on VMs, hook it into Aria Automation post-provisioning, and pass guestinfo metadata…
-

Decode SCSI Controllers with Orchestrator Code
How SCSI controllers work in vSphere VMs, why PVSCSI suits modern workloads, and the per-controller and per-VM disk limits. Includes Orchestrator code to add a controller,…
-

Custom Progress Bar in Orchestrator for Visual Feedback
A small ProgressBar action for VCF Orchestrator that draws text bars like [####—-] 60% and writes them to a vSphere VM custom attribute, so long provisioning…
-

Enhanced Logger: My enhancements to Gavin Stephens’s Logger Class
My take on Gavin Stephens’s Logger class for VCF Orchestrator: no errors on empty calls, emoji markers for workflows, actions, success and failure, and a one-line…
-

Quick enable Log Debug Mode in Orchestrator 8.18.1
Nothing from System.debug() showing up in your Orchestrator 8.18.1 logs? Set Server log level to ALL and Scripting log level to DEBUG under System Settings, Log…
-

How to use 3rd-party Polyglot modules as native JavaScript class in VCF Orchestrator
Wrap a third-party Node.js module like the yaml npm package in a VCF Orchestrator action environment, call it from a polyglot action, then expose it through…
-

Get Orchestrator Hostname and IP using JavaScript
There is no official API for the Orchestrator appliance hostname, so here are two workarounds: parse JVM_OPTS through a local Command, or read the vRA plugin…
-

Enabling Local Process Execution in Orchestrator via VRACLI
Command class calls in Orchestrator fail until local process execution is allowed. Set com.vmware.js.allow-local-process to true with one vracli command over SSH, restart the vco-app deployment…
-

Getting Started with Cisco UCS Manager REST API Using XML in Orchestrator
A first look at the Cisco UCS Manager XML API: log in with aaaLogin to get a session cookie, query a blade with configResolveDn, learn the…
-

Ways to generate random values in Orchestrator
Four ways to generate unique values in Orchestrator for VM names or IDs: Math.random(), a timestamp plus random suffix, a counter kept in a configuration element,…
-

Disable Git Push from Non-Dev Orchestrators
Keep git pushes limited to your Dev Orchestrator by giving non-Dev Orchestrators a read-only GitLab project access token and Dev a read-write one. Shows the push…
-

vRO LogMarker: Better than Logger Action?
Tracing logs across nested vRO workflows is hard. Compare a custom Logger action with the built-in System.setLogMarker(), which tags every log, warn, debug and error line…
-

How to create a custom JS class in vRO
vRO runs ES5.1, so there is no class keyword. Build a pseudo-class with a function and prototypes, use it locally in a scriptable task, or wrap…
-

Send vRA Deployment Lease Expiration Mails
A vRO action that pulls all vRA deployments from the Deployments API, handles pagination, works out the days left on each lease and emails the owners…
-

Upload a vRO package using vRO Node.js action
vRO handles multipart uploads poorly, so this uses a Node.js polyglot bundle as a read-only filesystem holding your package. Import the uploadPackageToVro.zip bundle into an action…
-

Workflow to run a Workflow over RESTAPI Dynamically
A vRO workflow that triggers another workflow on a remote vRO over the REST API using a transient REST host, plus an action that builds the…
-

Create ESXi root account with vRO
Create and manage ESXi local user accounts from vRO with the Scripting API. A createEsxiLocalUser action sets the access mode (Admin, ReadOnly, NoAccess), and a downloadable…
-

Edit text-based Resource Elements On-The-Go
Updating a text-based resource element in vRO usually means export, edit and re-import. This workflow package lets you pick a resource element such as a YAML…
-

How to modify vRO Workflow description using REST
Change a vRO workflow’s description without opening the editor. Use the vRO REST API Swagger page: GET the workflow schema by id, edit the description in…
-

Find Object Types in vRealize Orchestrator
Ways to find the type of an object in vRO JavaScript: typeof, System.getObjectType(), System.getObjectClassName() and instanceof. Each comes with a results table and code examples, including…









