How plug-ins work
Out of the box, Orchestrator’s JavaScript can add numbers, build strings, and wait. Everything it does to the outside world, it does through a plug-in. The vCenter plug-in is why a workflow input can be a VC:VirtualMachine, the HTTP-REST plug-in is why a script can call an API, and the SSH plug-in is why it can log in to a Linux server. Each plug-in brings the same four things: object types for scripts, an inventory of live objects, ready-made workflows and actions, and sometimes events from the system it talks to.
In this recipe you take one plug-in apart to see those four things, then look at how plug-ins are managed: installing a third-party one, turning one off, and raising one plug-in’s log level when it misbehaves.
Getting ready
- The standalone appliance
vco01.vmw.laband a login with administrator rights. Managing plug-ins needs an administrator; looking at them doesn’t. - The vCenter
vc01.vmw.labregistered with the vCenter plug-in (recipe 1.9). - The action module
com.vcfguide.chapter5. Create it with the first action in step 9. - For steps 13 to 16 only: a third-party plug-in file, a
.vmoappor.dar, from the vendor whose product it connects to.
How to do it
See which plug-ins are installed
- In the Orchestrator Client, go to System Settings. It shows four cards, Log Configuration, Plug-ins, Configuration Properties and Performance and Features. Click Open on Plug-ins. The list shows every installed plug-in with its version and whether it’s on.
- Find vCenter, HTTP-REST, SSH, and SQL in the list. These four are installed with the server and are the subject of this chapter.
System Settings > Plug-ins on vco01.vmw.lab, the full list of plug-ins with name, version and state, vCenter, HTTP-REST, SSH and SQL visible, and the Add Plug-in button.
Find a plug-in’s workflows
- Go to Library > Workflows and type the tags
sshandconfigurationin the search box. You get the SSH plug-in’s configuration workflows, such as Add SSH Host and Remove SSH Host. - Clear the
configurationtag and leavessh. Now you also see the plug-in’s other workflows, such as Run SSH command.
Every plug-in that connects to something has configuration workflows tagged configuration. They’re how you tell the plug-in what to connect to: a vCenter, a REST host, an SSH host, a database.
Look at its inventory
- Go to Administration > Inventory. Each entry in the list is a plug-in, and under it are the objects it knows about.
- Expand vSphere vCenter Server and
vc01.vmw.lab, then a data center and a VM. Select the VM. The pane on the right shows its properties, and the type of the object,VC:VirtualMachine.

Look at its scripting objects
- Open the API Explorer and search for
VirtualMachine. You find the typeVC:VirtualMachine, with the same properties and methods as the vSphere API’sVirtualMachineobject. - Search for
SSHSessionandRESTHost. Every type you find came from a plug-in; Orchestrator’s own types, such asSystemandServer, are listed apart from them.
Find objects from a script
- In Library > Actions, create the action
findInventoryObjectsin the new modulecom.vcfguide.chapter5, with the inputstypeandqueryof typestring, and the Return typeArray/string:
// Lists the inventory objects of one plug-in type, such as// "VC:VirtualMachine" or "SSH:Host", whose name matches query.// An empty query returns every object of that type.var objects = Server.findAllForType(type, query || null) || [];var lines = [];for (var i = 0; i < objects.length; i++) { lines.push(objects[i].name + " (" + System.getObjectType(objects[i]) + ")");}System.log(objects.length + " objects of type " + type);return lines;- Run the action with
type=VC:VirtualMachineand an emptyquery. The log reports how many VMs the vCenter plug-in sees, and the result lists their names. - Run it again with
type=VC:HostSystem. You get the ESXi hosts instead, through the same call.
Checked on 9.1.1 with VC:VirtualMachine:
- The
queryis a case-sensitive match anywhere in the name.rockyandylinuxboth foundrockylinux9androckylinux9_template;ROCKYfound nothing. - The vSphere plug-in also takes an XPath query:
xpath:name='rockylinux9'found exactly one VM. nullreturns every object of the type.System.getObjectTypereturns the type name, such asVC:VirtualMachineorSSH:Host, andSystem.getObjectIdthe plug-in’s ID, such asvc01.example.com,id:vm-2021.- A type name that doesn’t exist, such as
SSH:Hostx, throwsSDKNoSuchTypeException: SSH:Hostx, so a typo fails loudly instead of returning nothing.
Raise one plug-in’s log level
- Back in System Settings > Plug-ins, select SSH and change its log level to DEBUG. The SSH plug-in now writes more detail to the server log; the other plug-ins don’t. Set it back when you’ve found what you were looking for.
On 9.1.1, GET /vco/api/plugins lists every plug-in with its moduleName, file name, version (9.1.1.0 for the built-in ones), whether it’s enabled, and its own logLevel, which is DEFAULT for all of them in the lab, meaning it follows the server’s level from Log Configuration (recipe 4.6).
Install a third-party plug-in
- In System Settings > Plug-ins, click Add Plug-in.
- Click Select and choose the
.vmoappor.darfile. Choose a log level and click Next. - Check the plug-in’s name and version, accept the licence agreement, and click Install.
- Wait while the Orchestrator server restarts, which takes a few minutes, then log in again. The new plug-in is in the list, its workflows are in Library > Workflows, and its types are in the API Explorer.
Add Plug-in dialog after Next: the plug-in's name, version and vendor, the licence agreement with its check box, and the Install button.
How it works
A plug-in is a bundle of Java code and Orchestrator content that the server loads when it starts. The Java code talks to the external system, using whatever that system speaks: the vSphere API, HTTP, SSH, JDBC. The content is ordinary workflows and actions, stored in the plug-in’s own workflow folders and action modules, such as com.vmware.library.ssh.
The Java side tells Orchestrator about the plug-in in three ways:
- Scripting types. Each kind of object the plug-in handles becomes a type with a prefix, such as
VC:VirtualMachineorSSH:Host, or a plain name, such asSSHSession. Scripts use them like any other object, and workflow inputs, outputs, and variables can have them as their type. That’s what lets an input form show a VM picker. - The inventory. A plug-in can offer a tree of its objects. Orchestrator asks it for the children of a node when you expand it, so the inventory always shows the live state of the system, not a copy.
Server.findAllForTypeasks the same plug-in, by type, which is why one call can find VMs, hosts, or SSH hosts. - Events. Some plug-ins, such as AMQP, can tell Orchestrator when something happens in the external system, so a policy or a waiting workflow can react to it.
Configuration workflows exist because most plug-ins need to be told where to connect. The vCenter plug-in needs a vCenter, the HTTP-REST plug-in needs a REST host. Running Add a vCenter Server instance or Add a REST host stores that connection in Orchestrator’s database, and from then on the plug-in shows it in the inventory. Because the connection is in the database, it survives restarts, and every node of a cluster sees it.
The plug-ins in the list are a mix of those installed with the server, such as vCenter, HTTP-REST, SSH, SQL, Mail, and AMQP, and any you add. You can turn any of them off. You can only delete or replace the ones you installed yourself; the others are updated with Orchestrator.
Installing a plug-in restarts the Orchestrator server, because the server loads plug-ins only when it starts. Runs in progress are interrupted. Install plug-ins in a quiet moment, and on a cluster expect every node to restart.
There's more
Turning a plug-in off. Select the plug-in in System Settings > Plug-ins and turn it off. Its file stays on the server, so turning it back on later brings back its types and workflows. A plug-in you don’t use, such as SNMP or Auto Deploy on a server that never needs them, is a candidate. Check first that no workflow uses its types: workflows that do can’t run while it’s off.
Where to get third-party plug-ins. Third-party plug-ins come from the vendor of the product they connect to, such as a storage array, an IP address manager, or a backup product. Check that the vendor lists the plug-in as supported for VCF Operations Orchestrator 9, and install it on a test Orchestrator before production: it runs inside the server, with the server’s rights.
Plug-ins and packages. A package (Chapter 6) can carry your workflows and actions, but not the plug-ins they need. Install the same plug-ins, at the same versions, on every Orchestrator you move content to.
Writing your own. Orchestrator has a software development kit for writing plug-ins in Java. For most jobs you don’t need one: the HTTP-REST, SSH, and SQL plug-ins in the next recipes, plus actions in Python, Node.js, or PowerShell (Chapter 4), reach almost any system.
See also
- 1.9 Registering your first vCenter, the vCenter plug-in’s configuration workflow.
- 4.2 Writing and reusing actions, for modules and actions.
- 5.2 REST hosts and operations, 5.3 SSH commands and file copy, and 5.4 SQL databases, for three of the plug-ins in use.
- Broadcom TechDocs (VCF 9.1): Managing VCF Operations orchestrator plug-ins, Install, update, or delete a plug-in, and Plug-ins installed with the VCF Operations orchestrator server.
- Broadcom TechDocs (VCF 9.0): Using the VCF Operations orchestrator Plug-ins.
- Broadcom KB 422049: installing, updating, or deleting a third-party plug-in. KB 445534: plug-in management moved from Control Center into the client.
