Using VMware vRealize
Orchestrator Plug-Ins
12 April 2018
vRealize Automation 7.4
vRealize Orchestrator 7.4
Using VMware vRealize Orchestrator Plug-Ins
You can find the most up-to-date technical documentation on the VMware website at:
https://docs.vmware.com/
If you have comments about this documentation, submit your feedback to
docfeedback@vmware.com
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
Copyright © 2008–2017 VMware, Inc. All rights reserved. Copyright and trademark information .
VMware, Inc. 2
Contents
Using VMware vRealize Orchestrator Plug-Ins 10
Introduction to Orchestrator Plug-Ins 11
1
Orchestrator Architecture 11
Plug-Ins Installed with the Orchestrator Server 12
Access the Orchestrator API Explorer 15
Configure the Orchestrator Plug-Ins 16
2
Manage the Orchestrator Plug-Ins 16
Uninstall a Plug-In 17
Using the vCenter Server Plug-In 19
3
Configuring the vCenter Server Plug-In 19
Configuration Workflows 20
Configure the Connection to a vCenter Server Instance 20
vCenter Server Plug-In Scripting API 22
Using the vCenter Server Plug-In Inventory 22
Performance Considerations for Querying 22
Using XPath Expressions with the vCenter Server Plug-In 23
Using XPath Expressions with the vCenter Server Plug-In 23
Access the vCenter Server Plug-In Workflow Library 24
vCenter Server Plug-In Workflow Library 25
Batch Workflows 28
Cluster and Compute Resource Workflows 28
Configuration Workflows 29
Custom Attributes Workflows 29
Datacenter Workflows 29
Datastore and Files Workflows 30
Datacenter Folder Management Workflows 30
Host Folder Management Workflows 30
Virtual Machine Folder Management Workflows 31
Guest Operation Files Workflows 31
Guest Operation Processes Workflows 32
Power Host Management Workflows 32
Basic Host Management Workflows 32
Host Registration Management Workflows 33
Networking Workflows 33
Distributed Virtual Port Group Workflows 33
VMware, Inc.
3
Using VMware vRealize Orchestrator Plug-Ins
Distributed Virtual Switch Workflows 34
Standard Virtual Switch Workflows 34
Networking Virtual SAN Workflows 35
Resource Pool Workflows 35
Storage Workflows 35
Storage DRS Workflows 36
Storage VSAN Workflows 37
Basic Virtual Machine Management Workflows 37
Clone Workflows 38
Linked Clone Workflows 38
Linux Customization Clone Workflows 39
Tools Clone Workflows 39
Windows Customization Clone Workflows 40
Device Management Workflows 40
Move and Migrate Workflows 41
Other Workflows 41
Power Management Workflows 42
Snapshot Workflows 43
VMware Tools Workflows 43
Using the vRealize Automation Plug-In 44
4
Introduction to the VMware vRealize Orchestrator Plug-In for vRealize Automation 44
Role of vRealize Orchestrator with the vRealize Automation Plug-In 45
Configuring the vRealize Automation Plug-In 45
Configuration Workflows 45
Using the vRealize Automation Plug-In Workflows 48
Remove Operation Restrictions 48
Using the vRealize Automation Plug-In Inventory 50
Using the vRealize Automation Plug-In Administration Workflows 51
Using the vRealize Automation Plug-In Infrastructure Administration Workflows 57
Using the vRealize Automation Plug-In Requests Workflows 60
Using the vRealize Automation Plug-In Sample Workflows 61
Access the vRealize Automation Plug-In API 62
Example vRealize Automation Plug-In Scripts 62
CRUD Infrastructure Administration Tasks Example Scripts 62
Finding vRealize Automation Entities Example Scripts 67
Get a Resource Provisioned by vRealize Automation Example Script 68
Common Tasks Example Scripts 70
Using the Configuration Plug-In 73
5
Access the Configuration Plug-In Workflow Library 73
Configuration Plug-In Workflow Library 73
VMware, Inc. 4
Using VMware vRealize Orchestrator Plug-Ins
Using the Library Plug-In 75
6
Library Plug-In Workflows 75
Using the SQL Plug-In 77
7
Configuring the SQL Plug-In 77
SQL Plug-In Configuration Workflows 77
Add a Database 78
Add Tables to a Database 79
Update a Database 79
Running the SQL Sample Workflows 80
Generate a JDBC URL 80
Test a JDBC Connection 81
Create a Table by Using JDBC 81
Insert a Row into a JDBC Table 82
Select Rows from a JDBC Table 82
Delete an Entry from a JDBC Table 83
Delete All Entries from a JDBC Table 84
Drop a JDBC Table 84
Run a Complete JDBC Cycle 85
Using the SQL Plug-In Standard Workflows 85
SQL Plug-In Workflow Library 86
Generate CRUD Workflows for a Table 86
Using the SSH Plug-In 88
8
Configure the SSH Plug-In 88
Configuration Workflows 89
Running the SSH Plug-In Sample Workflows 89
Generate a Key Pair 90
Change the Key Pair Passphrase 90
Register an Orchestrator Public Key on an SSH Host 91
Run an SSH Command 91
Copy a File from an SSH Host 92
Copy a File to an SSH Host 93
Using the XML Plug-In 94
9
Running the XML Plug-In Sample Workflows 94
Create a Simple XML Document 95
Find an Element in an XML Document 95
Modify an XML Document 96
Create an Example Address Book from XML 97
VMware, Inc. 5
Using VMware vRealize Orchestrator Plug-Ins
Access the Mail Plug-In Sample Workflows 98
10
Add a Database 99
11
Add a REST Host 101
12
Add a SOAP Host 103
13
Change the Key Pair Passphrase 105
14
Configure the Connection to a vCenter Server Instance 106
15
Configure the SSH Plug-In 108
16
Copy a File from an SSH Host 109
17
Copy a File to an SSH Host 110
18
Plug-Ins Installed with the Orchestrator Server 111
19
Define the Default SMTP Connection 115
20
Generate a Key Pair 116
21
Mail Plug-In Sample Workflows 117
22
Register an Orchestrator Public Key on an SSH Host 118
23
Run an SSH Command 119
24
Using the Configuration Plug-In 120
25
Using the Mail Plug-In 121
26
Using the Mail Plug-In Sample Workflows 122
27
Using the Mail Plug-In 123
28
Define the Default SMTP Connection 123
Using the Mail Plug-In Sample Workflows 124
Access the Mail Plug-In Sample Workflows 124
Mail Plug-In Sample Workflows 124
VMware, Inc. 6
Using VMware vRealize Orchestrator Plug-Ins
Using the Net Plug-In 125
29
Using the Enumeration Plug-In 126
30
Time Zone Codes 126
Using the Workflow Documentation Plug-In 129
31
Workflow Library for the Workflow Documentation Plug-In 129
Generate Workflow Documentation 129
Using the HTTP-REST Plug-In 131
32
Configuring the HTTP-REST Plug-In 131
Configuration Workflows 131
Configure Kerberos Authentication 132
Add a REST Host 133
Add a REST Operation 135
Add a Schema to a REST Host 135
Generate a New Workflow from a REST Operation 136
Invoking a REST Operation 137
Invoke a REST Operation 137
Using the SOAP Plug-In 138
33
Configuring the SOAP Plug-In 138
Configuration Workflows 138
Add a SOAP Host 139
Configure Kerberos Authentication 140
Generate a New Workflow from a SOAP Operation 141
Test a Custom-Generated Workflow 142
Invoke a SOAP Operation 142
Using the AMQP Plug-In 144
34
Configuring the AMQP Plug-In 144
Configuration Workflows 144
Add a Broker 144
Subscribe to Queues 145
Update a Broker 146
Using the AMQP Plug-In Standard Workflows 146
Declare a Binding 147
Declare a Queue 147
Declare an Exchange 148
Send a Text Message 149
Delete a Binding 150
VMware, Inc. 7
Using VMware vRealize Orchestrator Plug-Ins
Using the SNMP Plug-In 151
35
Managing SNMP Devices 151
Device Management Workflows 151
Register an SNMP Device 152
Managing SNMP Queries 153
Query Management Workflows 153
Add a Query to an SNMP Device 153
Managing the SNMP Trap Host 154
Trap Host Management Workflows 154
Set the SNMP Trap Port 154
Receiving SNMP Traps 155
Wait for a Trap on an SNMP Device 155
Set an SNMP Trap Policy 156
Configure an SNMP Trap Host Policy 156
Edit a Trap Policy 157
Generic SNMP Request Workflows 158
Using the Active Directory Plug-In 159
36
Configuring the Active Directory Plug-In 159
Active Directory Configuration Workflows 159
Using the Active Directory Plug-In Workflow Library 160
Using the Active Directory Plug-In Inventory 160
Access the Active Directory Plug-In Workflow Library 160
Active Directory Plug-In Workflows 160
Using the Dynamic Types Plug-In 163
37
Dynamic Types Configuration Workflows 163
Using the PowerShell Plug-In 165
38
Introduction to the VMware vRealize Orchestrator PowerShell Plug-In 165
PowerShell Plug-In Components 165
Configuring WinRM 167
Configure Kerberos Authentication 170
Configuring the PowerShell Plug-In 172
Configuration Workflows 172
Add a PowerShell Host 172
Using the PowerShell Plug-In Inventory 173
Running PowerShell Scripts 173
Invoke a PowerShell Script 173
Invoke an External Script 174
VMware, Inc. 8
Using VMware vRealize Orchestrator Plug-Ins
Generating Actions 175
Generate an Action from a PowerShell Script 175
Generate an Action for a PowerShell Cmdlet 176
Passing Invocation Results Between Actions 177
PowerCLI Integration with the PowerShell Plug-In 177
Converter Workflows 178
Sample Workflows 178
Access the PowerShell Plug-In API 178
Working with PowerShell Results 179
Examples of Scripts for Common PowerShell Tasks 180
Troubleshooting 182
Enable Kerberos Event Logging 182
Servers Not Found in Kerberos Database 182
Unable to Obtain a Kerberos Ticket 183
Kerberos Authentication Fails Due to Different Time Settings 183
Kerberos Authentication Session Mode Fails 184
Unable to Reach a Key Distribution Center for a Realm 184
Unable to Locate the Default Realm 185
Using the Multi-Node Plug-In 186
39
Introduction to the vRealize Orchestrator Multi-Node Plug-In 186
Configuring the Multi-Node Plug-In 186
Servers Configuration Workflows 187
Add an Orchestrator Server 187
Using Proxy Workflows 187
Synchronous Proxy Workflows 188
Asynchronous Proxy Workflows 188
Remote Execution Workflows 189
Using the Multi-Node Plug-In Inventory 190
Remote Management Workflows 190
Access the Multi-Node Plug-In API 191
Multi-Node Plug-In Use Cases 191
Create a Multi-Proxy Action 192
Maintenance of Remote and Proxy Workflows 193
Deploy a Package from a Local Server 194
Using the vCloud Suite API (vAPI) Plug-In 195
40
Configuring the vCloud Suite API Plug-In 195
Import a vCloud Suite API Metamodel 195
Add a vCloud Suite API Endpoint 196
Access the vCloud Suite API Plug-In API 197
VMware, Inc. 9
Using VMware vRealize Orchestrator
Plug-Ins
Using VMware vRealize Orchestrator Plug-Ins provides information and instructions about configuring
and using the standard set of plug-ins installed with VMware® vRealize Orchestrator.
Intended Audience
This information is intended for advanced vSphere administrators and experienced system administrators
who are familiar with virtual machine technology and datacenter operations.
VMware, Inc. 10
Introduction to Orchestrator
Plug-Ins 1
With the Orchestrator plug-ins, you can access and control external technologies and applications.
Exposing an external technology in an Orchestrator plug-in lets you incorporate objects and functions in
workflows and run workflows on the objects of that external technology.
The external technologies that you access by using plug-ins include virtualization management tools,
email systems, databases, directory services, and remote control interfaces.
Orchestrator provides a standard set of preinstalled plug-ins, which expose the VMware vCenter Server
API, email and authentication capabilities, and other technologies. In addition, the Orchestrator open
plug-in architecture lets you to develop plug-ins to access other applications. Orchestrator implements
open standards to simplify integration with external systems. For information about developing custom
content, see Developing with VMware vRealize Orchestrator .
The standard set of plug-ins is automatically installed with the Orchestrator server. You might need to
configure some of the plug-ins, for example the vCenter Server plug-in, before start using them.
Plug-ins extend the Orchestrator scripting engine with new object types and methods, and plug-ins
publish notification events from the external system that triggers events in Orchestrator and in the
plugged-in technology. Plug-ins provide an inventory of JavaScript objects that you can access on the
Inventory tab of the Orchestrator client. Each plug-in contains packages of workflows and actions that
you can run on the objects in the inventory to automate the typical use cases of the integrated product.
This chapter includes the following topics:
n
Orchestrator Architecture
n
Plug-Ins Installed with the Orchestrator Server
n
Access the Orchestrator API Explorer
Orchestrator Architecture
Orchestrator contains a workflow library and a workflow engine to allow you to create and run workflows
that automate orchestration processes. You run workflows on the objects of different technologies that
Orchestrator accesses through a series of plug-ins.
Orchestrator provides a standard set of plug-ins, including a plug-in for vCenter Server, to allow you to
orchestrate tasks in the different environments that the plug-ins expose.
VMware, Inc.
11
Authentication
Providers
vCenter
Server
Orchestrator
database
vRealize Orchestrator
Client application
Web services REST
workflow library workflow engine
vCenter
Server
XML SSH SQL SMTP 3rd-party
plug-in
Using VMware vRealize Orchestrator Plug-Ins
Orchestrator also presents an open architecture to allow you to plug in external third-party applications to
the orchestration platform. You can run workflows on the objects of the plugged-in technologies that you
define yourself. Orchestrator connects to an authentication provider to manage user accounts, and to a
database to store information from the workflows that it runs. You can access Orchestrator, the
Orchestrator workflows, and the objects it exposes through the Orchestrator client interface, or through
Web services.
Figure 1‑ 1. VMware vRealize Orchestrator Architecture
Plug-Ins Installed with the Orchestrator Server
Orchestrator includes a collection of standard plug-ins. Each plug-in exposes an external product API to
the Orchestrator platform. Plug-ins provide inventory classes, additional object types for the scripting
engine, and publish notification events from the external system. Each plug-in also provides a library of
workflows for automating the typical use cases of the integrated external products.
You can see the list of the installed plug-ins on the Manage Plug-ins page in Control Center. For the
plug-ins that require configuration, there are separate tabs in the interface.
Table 1‑ 1. Plug-ins Installed With Orchestrator
Plug-In Purpose Configuration
vCenter Server Provides access to the vCenter Server API so that you can
Configuration Provides workflows for configuring the Orchestrator
incorporate all the vCenter Server objects and functions
into the management processes that you automate by
using Orchestrator.
authentication, database connection, SSL certificates, and
so on.
See Configuring the vCenter Server
Plug-In.
None
VMware, Inc. 12
Using VMware vRealize Orchestrator Plug-Ins
Table 1‑ 1. Plug-ins Installed With Orchestrator (Continued)
Plug-In Purpose Configuration
Library Provides workflows that act as basic building blocks for
customization and automation of client processes. The
workflow library includes templates for life cycle
management, provisioning, disaster recovery, hot backup,
and other standard system management processes. You
can copy and edit the templates to modify them according
to your needs.
SQL Provides the Java Database Connectivity (JDBC) API,
which is the industry standard for database-independent
connectivity between the Java programming language and
a wide range of databases. The databases include SQL
databases and other tabular data sources, such as
spreadsheets or flat files. The JDBC API provides a call-
level API for SQL-based database access from workflows.
SSH Provides an implementation of the Secure Shell v2
(SSH-2) protocol. Allows remote command and file transfer
sessions with password and public key-based
authentication in workflows. Supports keyboard-interactive
authentication. Optionally, the SSH plug-in can provide
remote file system browsing directly in the Orchestrator
client inventory.
XML A complete Document Object Model (DOM) XML parser
that you can implement in workflows. Alternatively, you can
use the ECMAScript for XML (E4X) implementation in the
Orchestrator JavaScript API.
None
None
See Configure the SSH Plug-In .
None
Mail Uses Simple Mail Transfer Protocol (SMTP) to send email
from workflows.
Net Uses the Jakarta Apache Commons Net Library. Provides
implementations of the Telnet, FTP, POP3, and IMAP
protocols. The POP3 and IMAP protocols is used for
reading email. In combination with the Mail plug-in, the Net
plug-in provides complete email sending and receiving
capabilities in workflows.
Workflow documentation Provides workflows that you can use to generate
information in PDF format about a workflow or a workflow
category.
Enumeration Provides common Enumerated Types that can be used in
workflows by other plug-ins.
HTTP-REST Enables management of REST Web services through an
interaction between vRealize Orchestrator and REST
hosts.
SOAP Lets you manage SOAP Web services by providing
interaction between vRealize Orchestrator and SOAP
hosts.
Set the default values for the
EmailMessage object to use.
See Chapter 20 Define the Default
SMTP Connection.
None
None
None
See Configuring the HTTP-REST
Plug-In.
See Configuring the SOAP Plug-In .
VMware, Inc. 13
Using VMware vRealize Orchestrator Plug-Ins
Table 1‑ 1. Plug-ins Installed With Orchestrator (Continued)
Plug-In Purpose Configuration
AMQP Lets you interact with Advanced Message Queuing
Protocol (AMQP) servers also known as brokers.
SNMP Enables vRealize Orchestrator to connect and receive
information from SNMP-enabled systems and devices.
Active Directory Provides interaction between vRealize Orchestrator and
Microsoft Active Directory.
Dynamic Types Lets you define dynamic types and create and use objects
of these dynamic types.
Multi-Node Contains workflows for hierarchical management,
management of Orchestrator instances, and scale-out of
Orchestrator activities.
PowerShell Lets you manage PowerShell hosts and run custom
PowerShell operations.
See Configuring the AMQP Plug-In .
None
See Configuring the Active Directory
Plug-In.
See Chapter 37 Using the Dynamic
Types Plug-In.
See Chapter 39 Using the Multi-
Node Plug-In.
See Chapter 38 Using the
PowerShell Plug-In.
Plug-In Components
Each plug-in is a DAR file package. The DAR files are stored in /var/lib/vco/app-server/plugins
on the Orchestrator Appliance. The components of each plug-in, such as workflow categories and API
modules, use different naming conventions.
Table 1‑ 2. Names of Plug-In Components
Plug-In Name in the
Configuration UI DAR File
vCenter Server
vRO Configuration
Library
SQL
SSH
XML
Mail
Net
Workflow
documentation
Common enumerated
types
Dynamic Types
o11nplugin-vsphere.dar
o11nplugin-configurator.dar
o11nplugin-library.dar
o11nplugin-database.dar
o11nplugin-ssh.dar
o11nplugin-xml.dar
o11nplugin-mail.dar
o11nplugin-jakartacommonsnet.dar
o11nplugin-wfdocs.dar
o11nplugin-enums.dar
o11n-plugin-dynamictypes.dar
Workflow
Categories API Module
vCenter
Configuration
Locking
Orchestrator
Troubleshooting
JDBC
SQL
SSH
XML
Mail
None
Workflow
documentation
None
Configuration
VC
Configurator
Not applicable.
SQL
SSH
XML
Mail
Net
Workflow documentation
Enums
DynamicTypes
HTTP-REST
VMware, Inc. 14
o11nplugin-rest.dar
Configuration
REST
Using VMware vRealize Orchestrator Plug-Ins
Table 1‑ 2. Names of Plug-In Components (Continued)
Plug-In Name in the
Configuration UI DAR File
SOAP
AMQP
SNMP
Active Directory
Orchestrator
o11n-plugin-soap.dar
o11n-plugin-amqp.dar
o11n-plugin-snmp.dar
o11nplugin-ad.dar
o11nplugin-multi-node.dar
Workflow
Categories API Module
Configuration
Configuration
Device Management
Query Management
Trap Host
Management
Computer
Configuration
Organizational Unit
User
User Group
Servers
Configuration
Remote Execution
Remote
Management
Tasks
Workflows
SOAP
AMQP
SNMP
AD
VCO
PowerShell
o11nplugin-powershell.dar
Configuration
Generate
Templates
PowerShell
Access the Orchestrator API Explorer
Orchestrator provides an API Explorer that you can use to search the Orchestrator API and see the
documentation for JavaScript objects that you can use in scripted elements.
You can consult an online version of the Scripting API for the vCenter Server plug-in on the Orchestrator
documentation home page.
Procedure
1 Log in to the Orchestrator client.
2 Select Tools > API Explorer.
The API Explorer appears. You can use it to search all the objects and functions of the Orchestrator API.
What to do next
Use the API Explorer to write scripts for scriptable elements.
VMware, Inc. 15
Configure the Orchestrator
Plug-Ins 2
The default Orchestrator plug-ins are configured only through workflows.
If you want to configure any of the default Orchestrator plug-ins, you need to use the specific workflow
from the Orchestrator client.
This chapter includes the following topics:
n
Manage the Orchestrator Plug-Ins
n
Uninstall a Plug-In
Manage the Orchestrator Plug-Ins
In the Manage Plug-Ins page of Control Center, you can view a list of all plug-ins that are installed in
Orchestrator and perform basic management actions.
Change Plug-Ins Logging Level
Instead of changing the logging level for Orchestrator, you can change it only for specific plug-ins.
Install a New Plug-In
With the Orchestrator plug-ins, the Orchestrator server can integrate with other software products. The
Orchestrator Appliance includes a set of preinstalled plug-ins and you can also install custom plug-ins.
All Orchestrator plug-ins are installed from Control Center. The file extensions that can be used
are .vmoapp and .dar . A .vmoapp file can contain a collection of several .dar files and can be installed
as an application, while a .dar file contains all the resources associated with one plug-in.
Disable a Plug-In
You can disable a plug-in by deselecting the Enable check box next to the name of the plug-in.
This action does not remove the plug-in file. For more information on uninstalling a plug-in in
Orchestrator, see Uninstall a Plug-In .
VMware, Inc.
16
Using VMware vRealize Orchestrator Plug-Ins
Uninstall a Plug-In
You can use Control Center to disable a plug-in, but this action does not remove the plug-in file from the
Orchestrator Appliance file system. To remove the plug-in file, you must log in to the
Orchestrator Appliance and remove the plug-in file manually.
Procedure
1 Delete the plug-in from the Orchestrator Appliance.
a Log in to the Orchestrator Appliance over SSH as root .
b Open the /etc/vco/app-server/plugins/_VSOPluginInstallationVersion.xml file with a
text editor.
c Delete the line of code that corresponds to the plug-in that you want to remove.
d Navigate to the /var/lib/vco/app-server/plugins directory.
e Delete the .dar archives that contain the plug-in that you want to remove.
2 Restart the vRealize Orchestrator services.
service vco-configurator restart && service vco-server restart
3 Log in to Control Center as root .
4 In the Manage Plug-Ins page, verify that the plug-in is removed.
5 Through the Orchestrator client, delete the packages and folders that are related to the plug-in.
a Log in to the Orchestrator client.
b Select Design from the drop-down menu in the upper-left corner.
c Click the Packages view.
d Right-click the package that you want to delete, and select Delete element with content .
Note Orchestrator elements that are locked in the read-only state, for example, workflows in the
standard library, are not deleted.
e From the Tools menu in the upper-right corner, select User preferences.
The Preferences context menu opens.
f On the General page, select the Delete non empty folder permitted check box.
You can now delete an entire folder, including its subfolders and workflows, with a single click.
g Click the Workflow view.
h Delete the folder of the plug-in that you want to remove.
VMware, Inc. 17
Using VMware vRealize Orchestrator Plug-Ins
i Click the Actions view.
j Delete the action modules of the plug-in that you want to remove.
6 Restart the vRealize Orchestrator services.
You removed all custom workflows, actions, policies, configurations, settings, and resources related to the
plug-in.
VMware, Inc. 18
Using the vCenter Server Plug-
In 3
You can use the vCenter Server plug-in to manage multiple vCenter Server instances. You can create
workflows that use the vCenter Server plug-in API to automate tasks in your vCenter Server environment.
The vCenter Server plug-in maps the vCenter Server API to the JavaScript that you can use in workflows.
The plug-in also provides actions that perform individual vCenter Server tasks that you can include in
workflows.
The vCenter Server plug-in provides a library of standard workflows that automate vCenter Server
operations. For example, you can run workflows that create, clone, migrate, or delete virtual machines.
The vCenter Server plug-in includes the Policy-Based Management (PBM) and the Storage Montoring
Service (SMS) APIs as scripting objects in the Orchestrator scripting API. The Storage Policy-Based
Management policies and components appear in the Orchestrator Inventory tab.
This chapter includes the following topics:
n
Configuring the vCenter Server Plug-In
n
vCenter Server Plug-In Scripting API
n
Using the vCenter Server Plug-In Inventory
n
Performance Considerations for Querying
n
Using XPath Expressions with the vCenter Server Plug-In
n
Access the vCenter Server Plug-In Workflow Library
n
vCenter Server Plug-In Workflow Library
Configuring the vCenter Server Plug-In
Before managing the objects in your vSphere inventory by using Orchestrator and to run workflows on the
objects, you must configure the vCenter Server plug-in and define the connection parameters between
Orchestrator and the vCenter Server instances you want to orchestrate.
You can configure the vCenter Server plug-in by running the vCenter Server configuration workflows from
the Orchestrator client.
VMware, Inc.
19
Using VMware vRealize Orchestrator Plug-Ins
To manage the objects in your vSphere inventory by using the vSphere Web Client, make sure that you
configure the Orchestrator server to work with the same vCenter Single Sign-On instance to which both
vCenter Server and vSphere Web Client are pointing. You must also ensure that Orchestrator is
registered as a vCenter Server extension. You register Orchestrator as a vCenter Server extension when
you specify a user (by providing the user name and password), who has the privileges to manage
vCenter Server extensions.
Configuration Workflows
The Configuration workflow category of the vCenter Server plug-in contains workflows that let you
manage the connections to vCenter Server instances.
You can access these workflows from Library > vCenter > Configuration in the Workflows view of the
Orchestrator client.
Workflow Name Description
Add a vCenter Server instance Configures Orchestrator to connect to a new vCenter Server instance so that you can
run workflows over the objects in the vSphere infrastructure.
List the vRealize Orchestrator
extensions of vCenter Server
Register Orchestrator as a
vCenter Server extension
Remove a vCenter Server instance Removes a vCenter Server instance from the Orchestrator inventory. You will no longer
Update a vCenter Server instance Updates the connection to a vCenter Server instance. For example, if the IP address of
Unregister a vCenter Server extension Unregisters a vSphere Web Client extension.
Lists all vRealize Orchestrator extensions of vCenter Server.
Registers the Orchestrator instance as a vCenter Server extension.
be able to orchestrate this vCenter Server instance.
your vCenter Server system changes, you must update the connection parameters to
the vCenter Server instance so that you can manage your vSphere inventory with
Orchestrator.
Configure the Connection to a vCenter Server Instance
You can configure the connections to vCenter Server instances by running the vCenter Server
configuration workflows in the Orchestrator client.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Click the Workflows view in the Orchestrator client.
3 In the workflows hierarchical list, expand Library > vCenter > Configuration and navigate to the
Add a vCenter Server instance workflow.
4 Right-click the Add a vCenter Server instance workflow and select Start workflow.
VMware, Inc. 20
Using VMware vRealize Orchestrator Plug-Ins
5 Enter the IP address or the DNS name of the machine on which the vCenter Server instance you
want to add is installed.
Note The hostname that you enter is case-sensitive.
6 Retain the default port value, 443 .
7 Retain the default location of the SDK to use to connect to your vCenter Server instance.
8 Select whether you want to manage the vCenter Server instance through Orchestrator, and click
Next.
9 Select whether you want to ignore certificate warnings for the vCenter Server instances that you want
to add.
If you choose to ignore certificate warnings, the vCenter Server instance certificate is accepted
silently and the certificate is added to the trusted store.
10 Select the method that you want to use to manage user access on the vCenter Server system.
Option Description
Share a unique session Allows Orchestrator to create only one connection to vCenter Server.
In the User name and Password text boxes, enter the credentials for
Orchestrator to use to establish the connection to the vCenter Server host.
The user that you select must be a valid user with privileges to manage
vCenter Server extensions and a set of custom defined privileges. Orchestrator
uses these credentials to monitor the VirtualCenter Web service, typically to run
Orchestrator system workflows.
Session per user Creates a new session to vCenter Server. This action might rapidly use CPU,
memory, and bandwidth.
Select this option only if your vCenter Server is in an Active Directory domain or if
vCenter Server Single Sign-On is enabled.
The user that you select must be a valid user with privileges to manage
vCenter Server extensions.
The user account that you select is also used by the policy engine to collect statistical and other data.
If the user that you select does not have enough privileges, the policy engine cannot access the
necessary parts of the vCenter Server inventory and cannot collect the necessary data.
11 (Optional) Enter the user domain.
You must specify the user domain name only when you select to use a shared session.
Note Fill this text box if session per user is selected.
12 (Optional) Enter the URLs for the vSphere storage management endpoints.
You can configure the Policy-Based Management (PBM) endpoint, the Storage Monitoring Service
(SMS) endpoint, or both.
13 Click Submit to run the workflow.
VMware, Inc. 21
Using VMware vRealize Orchestrator Plug-Ins
After the workflow runs successfully, the vCenter Server instance and all vSphere objects that belong to it
appear in the Inventory view.
vCenter Server Plug-In Scripting API
The vCenter Server scripting API contains classes, with their respective attributes, methods, and
constructors that allow interaction between vRealize Orchestrator and vCenter Server. You can use the
API to develop custom workflows.
For a list of available API objects, see https://www.vmware.com/support/orchestrator/doc/vro-vsphere65-
api/index.html.
Using the vCenter Server Plug-In Inventory
The vCenter Server plug-in exposes all objects of the connected vCenter Server instances in the
Inventory view. You can use the Inventory tab to add authorization elements or to run workflows on
vCenter Server objects.
If you enable the Use contextual menu in inventory option from the Inventory tab of the User
preferences tool, all of the workflows that you can run on the selected inventory object appear in a pop-up
menu.
Performance Considerations for Querying
With the vCenter Server plug-in for vRealize Orchestrator, you can query the vCenter Server inventory for
specific objects.
Querying Methods
For querying, you can either use the vCSearchIndex managed object, or the object finder methods that
are included in the plug-in inventory, such as getAllDatastores() , getAllVirtualMachines() ,
findAllForType() , and others.
Performance
By default, both methods return the queried objects without including any of their properties, unless you
specify a set of properties as an argument for the method parameters in the search query.
Note You must always use query expressions with the getAll...() and findAll...() finder objects
to prevent the Orchestrator client from filtering large sets of returned objects, which might affect the
overall performance of the Orchestrator server.
You can use two types of expressions for querying the vCenter Server inventory.
VMware, Inc. 22
Using VMware vRealize Orchestrator Plug-Ins
Type of Expression Description
Name expressions You can specify a name as an argument for a query parameter.
Note The objects are filtered by the specified name argument
according to the name of the plug-in object as it is appears in
the vCenter Server plug-in inventory.
XPath expressions You can use expressions based on the XPath query language.
For more information, see Using XPath Expressions with the
vCenter Server Plug-In.
When you invoke a vCenter Server inventory object with custom properties, each reference to this object,
in a workflow or an action, sends a query to the vCenter Server, which generates a noticeable
performance overhead. To optimize performance and avoid serializing and deserializing the object
multiple times within a workflow run, it is best to use a shared resource to store the object, instead of
storing it as a workflow attribute, an input, or an output parameter. Such shared resource can be a
configuration element or a resource element.
Using XPath Expressions with the vCenter Server Plug-In
You can use the finder methods in the vCenter Server plug-in to query for vCenter Server inventory
objects. You can use XPath expressions to define search parameters.
The vCenter Server plug-in includes a set of object finder methods such as getAllDatastores() ,
getAllResourcePools() , findAllForType() . You can use these methods to access the inventories of
the vCenter Server instances that are connected to your Orchestrator server and search for objects by ID,
name, or other properties.
For performance reasons, the finder methods do not return any properties for the queried objects, unless
you specify a set of properties in the search query.
You can consult an online version of the Scripting API for the vCenter Server plug-in on the Orchestrator
documentation home page.
Important The queries based on XPath expressions might impact the Orchestrator performance
because the finder method returns all objects of a given type on the vCenter Server side and the query
filters are applied on the vCenter Server plug-in side.
Using XPath Expressions with the vCenter Server Plug-In
When you invoke a finder method, you can use expressions based on the XPath query language. The
search returns all the inventory objects that match the XPath expressions. If you want to query for any
properties, you can include them to the search script in the form of a string array.
VMware, Inc. 23
Using VMware vRealize Orchestrator Plug-Ins
The following JavaScript example uses the VcPlugin scripting object and an XPath expression to return
the names of all datastore objects that are part of the vCenter Server managed objects and contain the
string ds in their names.
var datastores = VcPlugin.getAllDatastores(null, "xpath:name[contains(.,'ds')]");
for each (datastore in datastores){
System.log(datastore.name);
}
The same XPath expression can be invoked by using the Server scripting object and the
findAllForType finder method.
var datastores = Server.findAllForType("VC:Datastore", "xpath:name[contains(.,'ds')]");
for each (datastore in datastores){
System.log(datastore.name);
}
The following script example returns the names of all host system objects whose ID starts with the digit 1 .
var hosts = VcPlugin.getAllHostSystems(null, "xpath:id[starts-with(.,'1')]");
for each (host in hosts){
System.log(host.name);
}
The following script returns the names and IDs of all data center objects that contain the string DC , in
upper- or lower-case letters, in their names. The script also retrieves the tag property.
var datacenters = VcPlugin.getAllDatacenters(['tag'], "xpath:name[contains(translate(., 'DC', 'dc'),
'dc')]");
for each (datacenter in datacenters){
System.log(datacenter.name + “ ” + datacenter.id);
}
Access the vCenter Server Plug-In Workflow Library
You must use the Orchestrator client or the vSphere Web Client to access the elements from the
vCenter Server plug-in workflow library.
Prerequisites
n
Configure a connection to a vCenter Server instance.
n
Verify that the user account you are logged in with has the necessary permissions to run
vCenter Server workflows.
Procedure
1 In the Orchestrator client, select Design or Run from the drop-down menu in the left upper corner.
2 Click the Workflows view in the Orchestrator client left pane.
VMware, Inc. 24
Using VMware vRealize Orchestrator Plug-Ins
3 Expand the hierarchical list to Library > vCenter.
What to do next
Review the workflow library.
vCenter Server Plug-In Workflow Library
The vCenter Server plug-in workflow library contains workflows that you can use to run automated
processes related to the management of vCenter Server.
n
Batch Workflows
Batch workflows populate configuration elements or run workflows on a selected vCenter Server
object.
n
Cluster and Compute Resource Workflows
With the cluster and compute resource workflows, you can create, rename, or delete a cluster. You
can also enable or disable high availability, Distributed Resource Scheduler, and
vCloud Distributed Storage on a cluster.
n
Configuration Workflows
The Configuration workflow category of the vCenter Server plug-in contains workflows that let you
manage the connections to vCenter Server instances.
n
Custom Attributes Workflows
With custom attributes workflows, you can add custom attributes to virtual machines or get a custom
attribute for a virtual machine.
n
Datacenter Workflows
With datacenter workflows, you can create, delete, reload, rename, or rescan a datacenter.
n
Datastore and Files Workflows
With the datastore and files workflows, you can delete a list of files, find unused files in a datastore,
and so on.
n
Datacenter Folder Management Workflows
With datacenter folder management workflows, you can create, delete, or rename a datacenter
folder.
n
Host Folder Management Workflows
With host folder management workflows, you can create, delete, or rename a host folder.
n
Virtual Machine Folder Management Workflows
With virtual machine folder management workflows, you can create, delete, or rename a virtual
machine folder.
n
Guest Operation Files Workflows
With the guest operation files workflows, you can manage files in a guest operating system.
VMware, Inc. 25
Using VMware vRealize Orchestrator Plug-Ins
n
Guest Operation Processes Workflows
With guest operation processes workflows, you can get information and control the running
processes in a guest operating system.
n
Power Host Management Workflows
With power host management workflows you can reboot or shut down a host.
n
Basic Host Management Workflows
With the basic host management workflows, you can put a host into maintenance mode and make a
host exit maintenance mode. You can also move a host to a folder or a cluster, and reload data from
a host.
n
Host Registration Management Workflows
With the host registration management workflows, you can add a host to a cluster, disconnect, or
reconnect a host from a cluster, and so on.
n
Networking Workflows
With networking workflows you can add a port group to distributed virtual switch, create a distributed
virtual switch with a port group, and so on.
n
Distributed Virtual Port Group Workflows
With the distributed virtual port group workflows, you can update or delete a port group, and
reconfigure the port group.
n
Distributed Virtual Switch Workflows
With distributed virtual switch workflows, you can create, update or delete a distributed virtual switch,
and create, delete, or update a private VLAN.
n
Standard Virtual Switch Workflows
With the standard virtual switch workflows you can create, update, or delete a standard virtual
switch, and create, delete, or update port groups in standard virtual switches.
n
Networking Virtual SAN Workflows
With Virtual SAN workflows, you can configure Virtual SAN network traffic.
n
Resource Pool Workflows
With the resource pool workflows you can create, rename, reconfigure or delete a resource pool,
and get resource pool information.
n
Storage Workflows
With the storage workflows, you can perform storage-related operations.
n
Storage DRS Workflows
With the storage DRS workflows, you perform storage-related operations, such as creating and
configuring a datastore cluster, removing a datastore from cluster, adding storage to a cluster, and
others.
VMware, Inc. 26
Using VMware vRealize Orchestrator Plug-Ins
n
Storage VSAN Workflows
With the Virtual SAN workflows, you can manage non-SSD disks and disk groups in a Virtual SAN
cluster.
n
Basic Virtual Machine Management Workflows
With the basic virtual machine management workflows, you can perform basic operations on virtual
machines, for example, create, rename or delete a virtual machine, upgrade virtual hardware, and
others.
n
Clone Workflows
With clone workflows, you can clone virtual machines with or without customizing the virtual machine
properties.
n
Linked Clone Workflows
With the linked clone workflows, you can perform linked clone operations such as restoring a virtual
machine from a linked clone, creating a linked clone, or others.
n
Linux Customization Clone Workflows
With Linux customization workflows, you can clone a Linux virtual machine and customize the guest
operating system.
n
Tools Clone Workflows
With the tools clone workflows, you can obtain customization information about the operating system
of the virtual machine, information required to update a virtual device, and others.
n
Windows Customization Clone Workflows
With the Windows customization clone workflows, you can clone Windows virtual machines and
customize the guest operating system.
n
Device Management Workflows
With the device management workflows, you can manage the devices that are connected to a virtual
machine or to a host datastore.
n
Move and Migrate Workflows
With the move and migrate workflows, you can migrate virtual machines.
n
Other Workflows
With the workflows from the Others category, you can enable and disable Fault Tolerance (FT),
extract virtual machine information, and find orphaned virtual machines.
n
Power Management Workflows
With the power management workflows, you can power on and off virtual machines, reboot the
guest operating system of a virtual machine, suspend a virtual machine, and others.
n
Snapshot Workflows
With snapshot workflows, you can perform snapshot-related operations.
n
VMware Tools Workflows
With VMware Tools workflows, you can perform VMware Tools-related tasks on virtual machines.
VMware, Inc. 27
Using VMware vRealize Orchestrator Plug-Ins
Batch Workflows
Batch workflows populate configuration elements or run workflows on a selected vCenter Server object.
You can access the batch workflows from Library > vCenter > Batch in the Workflows view of the
Orchestrator client.
Workflow Name Description
Fill batch configuration
elements
Run a workflow on a
selection of objects
Populates the configuration elements that the Run a workflow on a selection of objects workflow uses.
Performs the following tasks:
n
Resets the BatchObject and BatchAction configuration elements.
n
Fills the BatchObject configuration element with all the workflows that have only one input
parameter.
n
Fills the BatchAction configuration element with all the actions that have no input parameters or one
input parameter and that have an array as the returnType .
Runs a workflow on a selection of vCenter Server objects, taking one action as input. This is the action
that retrieves the list of objects on which to run the workflow. To return the objects without running the
selected workflow, run the workflow in simulation mode.
Cluster and Compute Resource Workflows
With the cluster and compute resource workflows, you can create, rename, or delete a cluster. You can
also enable or disable high availability, Distributed Resource Scheduler, and vCloud Distributed Storage
on a cluster.
You can access the cluster and compute resource workflows from Library > vCenter > Cluster and
Compute Resource in the Workflows view of the Orchestrator client.
Workflow Name Description
Add DRS virtual machine group to cluster Adds a DRS virtual machine group to a cluster.
Add virtual machines to DRS group Adds a virtual machine list to an existing DRS virtual machine group.
Create cluster Creates a cluster in a host folder.
Delete cluster Deletes a cluster.
Disable DRS on cluster Disables DRS on a cluster.
Disable HA on cluster Disables high availability on a cluster.
Disable vCloud Distributed Storage on cluster Disables vCloud Distributed Storage on a cluster.
Enable DRS on cluster Enables DRS on a cluster.
Enable HA on cluster Enables high availability on a cluster.
Enable vCloud Distributed Storage on cluster Enables vCloud Distributed Storage on a cluster.
Remove virtual machine DRS group from cluster Removes a DRS virtual machine group from a cluster.
Remove virtual machines from DRS group Removes virtual machines from a cluster DRS group.
Rename cluster Renames a cluster.
VMware, Inc. 28
Using VMware vRealize Orchestrator Plug-Ins
Configuration Workflows
The Configuration workflow category of the vCenter Server plug-in contains workflows that let you
manage the connections to vCenter Server instances.
You can access these workflows from Library > vCenter > Configuration in the Workflows view of the
Orchestrator client.
Workflow Name Description
Add a vCenter Server instance Configures Orchestrator to connect to a new vCenter Server instance so that you can
run workflows over the objects in the vSphere infrastructure.
List the Orchestrator extensions of
vCenter Server
Register Orchestrator as a
vCenter Server extension
Remove a vCenter Server instance Removes a vCenter Server instance from the Orchestrator inventory. You cannot
Update a vCenter Server instance Updates the connection to a vCenter Server instance. For example, if the IP address of
Unregister a vCenter Server extension Unregisters a vCenter Server extension.
Lists all Orchestrator extensions of vCenter Server.
Registers the Orchestrator instance as a vCenter Server extension.
orchestrate this vCenter Server instance any longer.
your vCenter Server system changes, you must update the connection parameters to
the vCenter Server instance so that you can manage your vSphere inventory with
Orchestrator.
Custom Attributes Workflows
With custom attributes workflows, you can add custom attributes to virtual machines or get a custom
attribute for a virtual machine.
You can access the custom attributes workflows from Library > vCenter > Custom Attributes in the
Workflows view of the Orchestrator client.
Workflow Name Description
Add custom attribute to a virtual machine Adds a custom attribute to a virtual machine.
Add custom attribute to multiple virtual machines Adds a custom attribute to a selection of virtual machines.
Get custom attribute Gets a custom attribute for a virtual machine in vCenter Server.
Datacenter Workflows
With datacenter workflows, you can create, delete, reload, rename, or rescan a datacenter.
You can access the datacenter workflows from Library > vCenter > Datacenter in the Workflows view
of the Orchestrator client.
Workflow Name Description
Create datacenter Creates a data center in a data center folder.
Delete datacenter Deletes a data center.
VMware, Inc. 29
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Reload datacenter Forces vCenter Server to reload data from a data center.
Rename datacenter Renames a data center and waits for the task to complete.
Rescan datacenter HBAs Scans the hosts in a data center and initiates a rescan on the host bus adapters to discover new
storage.
Datastore and Files Workflows
With the datastore and files workflows, you can delete a list of files, find unused files in a datastore, and
so on.
You can access the datastore and files workflows from Library > vCenter > Datastore and Files in the
Workflows view of the Orchestrator client.
Workflow Name Description
Delete all files Deletes a list of files.
Delete all unused datastore files Searches all datastores in the vCenter Server environment and deletes all unused files.
Export unused datastore files Searches all datastores and creates an XML descriptor file that lists all unused files.
Find unused files in datastores Searches the vCenter Server environment for all unused disks (*.vmdk ), virtual machines
(*.vmx ), and template (*.vmtx ) files that are not associated with any
vCenter Serverinstances registered with Orchestrator.
Get all configuration, template, and
disk files from virtual machines
Log all datastore files Creates a log for every virtual machine configuration file and every virtual machine file found
Log unused datastore files Searches the vCenter Server environment for unused files that are registered on virtual
Upload file to datastore Uploads a file to an existing folder on a specific datastore. The uploaded file overwrites any
Creates a list of all virtual machine descriptor files and a list of all virtual machine disk files, for
all datastores.
in all datastores.
machines and exports a log of the files in a text file.
existing file with the same name in the same destination folder.
Datacenter Folder Management Workflows
With datacenter folder management workflows, you can create, delete, or rename a datacenter folder.
You can access the datacenter folder management workflows from Library > vCenter > Folder
management > Datacenter folder in the Workflows view of the Orchestrator client.
Workflow Name Description
Create datacenter folder Creates a data center folder.
Delete datacenter folder Deletes a data center folder and waits for the task to complete.
Rename datacenter folder Renames a data center folder and waits for the task to complete.
Host Folder Management Workflows
With host folder management workflows, you can create, delete, or rename a host folder.
VMware, Inc. 30
Using VMware vRealize Orchestrator Plug-Ins
You can access the host folder management workflows from Library > vCenter > Folder management >
Host folder in the Workflows view of the Orchestrator client.
Workflow Name Description
Create host folder Creates a host folder.
Delete host folder Deletes a host folder and waits for the task to complete.
Rename host folder Renames a host folder and waits for the task to complete.
Virtual Machine Folder Management Workflows
With virtual machine folder management workflows, you can create, delete, or rename a virtual machine
folder.
You can access the virtual machine folder management workflows from Library > vCenter > Folder
management > VM folder in the Workflow view of the Orchestrator client.
Workflow Name Description
Create virtual machine folder Creates a virtual machine folder.
Delete virtual machine folder Deletes a virtual machine folder and waits for the task to complete.
Rename virtual machine folder Renames a virtual machine folder and waits for the task to complete.
Guest Operation Files Workflows
With the guest operation files workflows, you can manage files in a guest operating system.
You can access the guest operation files workflows from Library > vCenter > Guest operations > Files
in the Workflows view of the Orchestrator client.
Workflow Name Description
Check for directory in guest Verifies that a directory exists in a guest virtual machine.
Check for file in guest Verifies that a file exists in a guest virtual machine.
Copy file from guest to Orchestrator Copies a specified file from a guest file system to an Orchestrator server.
Copy file from Orchestrator to guest Copies a specified file from an Orchestrator server to a guest file system.
Create directory in guest Creates a directory in a guest virtual machine.
Create temporary directory in guest Creates a temporary directory in a guest virtual machine.
Create temporary file in guest Creates a temporary file in a guest virtual machine.
Delete directory in guest Deletes a directory from a guest virtual machine.
Delete file in guest Deletes a file from a guest virtual machine.
List path in guest Shows a path in a guest virtual machine.
Move directory in guest Moves a directory in a guest virtual machine.
Move file in guest Moves a file in a guest virtual machine.
VMware, Inc. 31
Using VMware vRealize Orchestrator Plug-Ins
Guest Operation Processes Workflows
With guest operation processes workflows, you can get information and control the running processes in
a guest operating system.
You can access the guest operation files workflows from Library > vCenter > Guest operations >
Processes in the Workflows view of the Orchestrator client.
Workflow Name Description
Get environment variables from guest Returns a list with environmental variables from a guest. An interactive session returns the
variables of the user who is currently logged in.
Get processes from guest Returns a list with the processes running in the guest operating system and the recently
completed processes started by the API.
Run program in guest Starts a program in a guest operating system.
Kill process in guest Terminates a process in a guest operating system.
Power Host Management Workflows
With power host management workflows you can reboot or shut down a host.
You can access the power host management workflows from Library > vCenter > Host management >
Power in the Workflows view of the Orchestrator client.
Reboot host Reboots a host. If the Orchestrator client is connected directly to the host, it
loses the connection to the host and does not receive an indication of
success in the returned task.
Shut down host Shuts down a host. If the Orchestrator client is connected directly to the
host, it loses the connection to the host and does not receive an indication
of success in the returned task.
Basic Host Management Workflows
With the basic host management workflows, you can put a host into maintenance mode and make a host
exit maintenance mode. You can also move a host to a folder or a cluster, and reload data from a host.
You can access the basic host management workflows from Library > vCenter > Host management >
Basic in the Workflows view of the Orchestrator client.
Workflow Name Description
Enter maintenance mode Puts the host into maintenance mode. You can cancel the task.
Exit maintenance mode Exits maintenance mode. You can cancel the task.
Move host to cluster Moves an existing host to a cluster. The host must be part of the same data center, and if the host is
part of a cluster, the host must be in maintenance mode.
VMware, Inc. 32
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Move host to folder Moves a host into a folder as a standalone host. The host must be part of a ClusterComputeResource
in the same data center and the host must be in maintenance mode.
Reload host Forces vCenter Server to reload data from a host.
Host Registration Management Workflows
With the host registration management workflows, you can add a host to a cluster, disconnect, or
reconnect a host from a cluster, and so on.
You can access the host management registration workflows from Library > vCenter > Host
management > Registration in the Workflows view of the Orchestrator client.
Workflow Name Description
Add host to cluster Adds a host to the cluster. This workflow fails if it cannot authenticate the SSL certificate of the
host.
Add standalone host Registers a host as a standalone host.
Disconnect host Disconnects a host from the vCenter Server instance.
Reconnect host Reconnects a disconnected host by providing only the host information.
Reconnect host with all
information
Remove host Removes a host and unregisters it from the vCenter Server instance. If the host is part of a
Reconnects a disconnected host by providing all information about the host.
cluster, you must put it in maintenance mode before attempting to remove it.
Networking Workflows
With networking workflows you can add a port group to distributed virtual switch, create a distributed
virtual switch with a port group, and so on.
You can access the networking workflows from Library > vCenter > Networking in the Workflows view
of the Orchestrator client.
Workflow Name Description
Add port group to distributed virtual switch Adds a new distributed virtual port group to a specified distributed virtual switch.
Attach host system to distributed virtual switch Adds a host to a distributed virtual switch.
Create distributed virtual switch with port group Creates a new distributed virtual switch with a distributed virtual port group.
Distributed Virtual Port Group Workflows
With the distributed virtual port group workflows, you can update or delete a port group, and reconfigure
the port group.
You can access the distributed virtual port group workflows from Library > vCenter > Networking >
Distributed virtual port group in the Workflows view of the Orchestrator client.
VMware, Inc. 33
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Connect virtual machine NIC number to
distributed virtual port group
Delete distributed virtual port group Deletes a specified distributed virtual port group.
Set teaming options Provides an interface to manage the teaming options for a distributed virtual port group.
Update distributed virtual port group Updates the configuration of a specified distributed virtual port group.
Reconfigures the network connection of the specified virtual machine NIC number to
connect to the specified distributed virtual port group. If no NIC number is specified, the
number zero is used.
Distributed Virtual Switch Workflows
With distributed virtual switch workflows, you can create, update or delete a distributed virtual switch, and
create, delete, or update a private VLAN.
You can access the distributed virtual switch workflows from Library > vCenter > Networking >
Distributed virtual switch in the Workflows view of the Orchestrator client.
Workflow Name Description
Create distributed virtual switch Creates a distributed virtual switch in the specified network folder with a name and uplink port
names that you specify. You must specify at least one uplink port name.
Create private VLAN Creates a VLAN on the specified distributed virtual switch.
Delete distributed virtual switch Deletes a distributed virtual switch and all associated elements.
Delete private VLAN Deletes a VLAN from a specified distributed virtual switch. If a secondary VLAN exists, you must
first delete the secondary VLAN.
Update distributed virtual switch Updates the properties of a distributed virtual switch.
Update private VLAN Updates a VLAN on the specified distributed virtual switch.
Standard Virtual Switch Workflows
With the standard virtual switch workflows you can create, update, or delete a standard virtual switch, and
create, delete, or update port groups in standard virtual switches.
You can access the standard virtual switch workflows from Library > vCenter > Networking > Standard
virtual switch in the Workflows view of the Orchestrator client.
Workflow Name Description
Add port group in standard virtual switch Adds a port group in a standard virtual switch.
Create standard virtual switch Creates a standard virtual switch.
Delete port group from standard virtual switch Deletes a port group from a standard virtual switch.
Delete standard virtual switch Deletes a standard virtual switch from a host network configuration.
Retrieve all standard virtual switches Retrieves all standard virtual switches from a host.
Update port group in standard virtual switch Updates the properties of a port group in a standard virtual switch.
VMware, Inc. 34
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Update standard virtual switch Updates the properties of a standard virtual switch.
Update VNIC for port group in standard virtual
switch
Updates a virtual NIC associated with a port group in a standard virtual
switch.
Networking Virtual SAN Workflows
With Virtual SAN workflows, you can configure Virtual SAN network traffic.
You can access the networking workflows from Library > vCenter > Networking > VSAN in the
Workflows view of the Orchestrator client.
Workflow Name Description
Set a cluster's VSAN traffic network Sets a Virtual SAN traffic network of the cluster.
Set a host's VSAN traffic network Sets a Virtual SAN traffic network of the host.
Resource Pool Workflows
With the resource pool workflows you can create, rename, reconfigure or delete a resource pool, and get
resource pool information.
You can access the resource pool workflows from Library > vCenter > Resource Pool in the Workflows
view of the Orchestrator client.
Workflow Name Description
Create resource pool Creates a resource pool with the default CPU and memory allocation values. To create a
resource pool in a cluster, the cluster must have VMware DRS enabled.
Create resource pool with
specified values
Delete resource pool Deletes a resource pool and waits for the task to complete.
Get resource pool information Returns CPU and memory information about a given resource pool.
Reconfigure resource pool Reconfigures CPU and memory allocation configuration for a given resource pool.
Rename resource pool Renames a resource pool and waits for the task to complete
Creates a resource pool with CPU and memory allocation values that you specify. To create a
resource pool in a cluster, the cluster must have VMware DRS enabled.
Storage Workflows
With the storage workflows, you can perform storage-related operations.
You can access the storage workflows from Library > vCenter > Storage in the Workflows view of the
Orchestrator client.
Workflow Name Description
Add datastore on iSCSI/FC/local SCSI Creates a datastore on a Fibre Channel, iSCSI or local SCSI disk. Only disks that are not
currently in use by an existing VMFS are applicable to new datastore creation. The new
datastore allocates the maximum available space of the specified disk.
Add datastore on NFS Adds a datastore on an NFS server.
VMware, Inc. 35
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Add iSCSI target Adds iSCSI targets to a vCenter Server host. The targets can be of the type Send or
Static.
Create VMFS for all available disks Creates a VMFS volume for all available disks of a specified host.
Delete datastore Deletes datastores from a vCenter Server host.
Delete iSCSI target Deletes already configured iSCSI targets. The targets can be of type Send or Static .
Disable iSCSI adapter Disables the software iSCSI adapter of a specified host.
Display all datastores and disks Displays the existing datastores and available disks on a specified host.
Enable iSCSI adapter Enables an iSCSI adapter.
List all storage adapters Lists all storage adapters of a specified host.
Storage DRS Workflows
With the storage DRS workflows, you perform storage-related operations, such as creating and
configuring a datastore cluster, removing a datastore from cluster, adding storage to a cluster, and others.
You can access the storage DRS workflows from Library > vCenter > Storage > Storage DRS in the
Workflows view of the Orchestrator client.
Workflow Name Description
Add datastore to cluster Adds datastores to a datastore cluster. Datastores must be able to connect to all hosts to be
included in the datastore cluster. Datastores must have the same connection type to reside
within a datastore cluster.
Change Storage DRS per virtual
machine configuration
Configure datastore cluster Configures datastore cluster setting values for automation and runtime rules.
Create simple datastore cluster Creates a simple datastore cluster with default configuration. The new datastore cluster
Create Storage DRS scheduled task Creates a scheduled task for reconfiguring a datastore cluster. Only automation and runtime
Create virtual machine anti-affinity
rule
Create VMDK anti-affinity rule Creates a VMDK anti-affinity rule for a virtual machine that indicates which of its virtual disks
Remove datastore cluster Removes a datastore cluster. Removing a datastore cluster also removes all the settings
Remove datastore from cluster Removes a datastore from a datastore cluster and puts the datastore in a datastore folder.
Sets Storage DRS settings for each virtual machine.
contains no datastores.
rules can be set.
Creates an anti-affinity rule to indicate that all virtual disks of certain virtual machines must
be kept on different datastores.
must be kept on different datastores. The rule applies to the virtual disks of the selected
virtual machine.
and the alarms for the cluster from the vCenter Server system.
Remove Storage DRS scheduled
task
Remove virtual machine anti-affinity
rule
Remove VMDK anti-affinity rule Removes a VMDK anti-affinity rule for a given datastore cluster.
VMware, Inc. 36
Removes a scheduled Storage DRS task.
Removes a virtual machine anti-affinity rule for a given datastore cluster.
Using VMware vRealize Orchestrator Plug-Ins
Storage VSAN Workflows
With the Virtual SAN workflows, you can manage non-SSD disks and disk groups in a Virtual SAN cluster.
You can access the networking workflows from Library > vCenter > Storage > VSAN in the Workflows
view of the Orchestrator client.
Workflow Name Description
Add disks to a disk group Adds non-SSD disks to a Virtual SAN disk group.
Claim disks into disk groups Claims disks for use by the Virtual SAN system and automatically creates disk groups and
distributes the disks into existing disk groups.
Create a disk group Creates a Virtual SAN disk group.
List hosts, disk groups and disks Lists all hosts in a cluster, their disk groups and disks, used or eligible for use by the Virtual SAN
system.
Remove disk groups Removes Virtual SAN disk groups.
Remove disks from disk groups Removes non-SSD disks from Virtual SAN disk groups.
Basic Virtual Machine Management Workflows
With the basic virtual machine management workflows, you can perform basic operations on virtual
machines, for example, create, rename or delete a virtual machine, upgrade virtual hardware, and others.
You can access the basic virtual machine management workflows from Library > vCenter > Virtual
Machine management > Basic in the Workflows view of the Orchestrator client.
Workflow Name Description
Create custom virtual machine Creates a virtual machine with the specified configuration options and additional devices.
Create simple dvPortGroup virtual
machine
Create simple virtual machine Creates a virtual machine with the most common devices and configuration options.
Delete virtual machine Removes a virtual machine from the inventory and datastore.
Get virtual machines by name Returns a list of virtual machines from all registered vCenter Server instances that match the
Mark as template Converts an existing virtual machine to a template, not allowing it to start. You can use
Mark as virtual machine Converts an existing template to a virtual machine, allowing it to start.
Move virtual machine to folder Moves a virtual machine to a specified virtual machine folder.
Creates a simple virtual machine. The network used is a Distributed Virtual Port Group.
provided expression.
templates to create virtual machines.
Move virtual machine to resource
pool
Move virtual machines to folder Moves several virtual machines to a specified virtual machine folder.
Move virtual machines to resource
pool
VMware, Inc. 37
Moves a virtual machine to a resource pool. If the target resource pool is not in the same
cluster, you must use the migrate or relocate workflows.
Moves several virtual machines to a resource pool.
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Register virtual machine Registers a virtual machine. The virtual machine files must be placed in an existing datastore
and must not be already registered.
Reload virtual machine Forces vCenter Server to reload a virtual machine.
Rename virtual machine Renames an existing virtual machine on the vCenter Server system or host and not on the
datastore.
Set virtual machine performance Changes performance settings such as shares, minimum and maximum values, shaping for
network, and disk access of a virtual machine.
Unregister virtual machine Removes an existing virtual machine from the inventory.
Upgrade virtual machine
hardware (force if required)
Upgrade virtual machine Upgrades the virtual hardware to the latest revision that the host supports. An input parameter
Wait for task and answer virtual
machine question
Upgrades the virtual machine hardware to the latest revision that the host supports. This
workflow forces the upgrade to continue, even if VMware Tools is out of date. If the
VMware Tools is out of date, forcing the upgrade to continue reverts the guest network settings
to the default settings. To avoid this situation, upgrade VMware Tools before running the
workflow.
allows a forced upgrade even if VMware Tools is out of date.
Waits for a vCenter Server task to complete or for the virtual machine to ask a question. If the
virtual machine requires an answer, accepts user input and answers the question.
Clone Workflows
With clone workflows, you can clone virtual machines with or without customizing the virtual machine
properties.
You can access the clone workflows from Library > vCenter > Virtual Machine management > Clone in
the Workflows view of the Orchestrator client.
Workflow Name Description
Clone virtual machine from properties Clones virtual machines by using properties as input parameters.
Clone virtual machine, no customization Clones a virtual machine without changing anything except the virtual machine UUID.
Customize virtual machine from properties Customizes a virtual machine by using properties as input parameters.
Linked Clone Workflows
With the linked clone workflows, you can perform linked clone operations such as restoring a virtual
machine from a linked clone, creating a linked clone, or others.
You can access the linked clone workflows from Library > vCenter > Virtual Machine management >
Clone > Linked Clone folder and its subfolders in the Workflows view of the Orchestrator client.
Workflow Name Description
Restore virtual machine from linked clone Removes a virtual machine from a linked clone setup.
Set up virtual machine for linked clone Prepares a virtual machine to be link cloned.
Create a linked clone of a Linux machine with
multiple NICs
VMware, Inc. 38
Creates a linked clone of a Linux virtual machine, performs the guest operating
system customization, and configures up to four virtual network cards.
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Create a linked clone of a Linux machine with a
single NIC
Create a linked clone of a Windows machine with
multiple NICs and credential
Create a linked clone of a Windows machine with
a single NIC and credential
Create a linked clone with no customization Creates the specified number of linked clones of a virtual machine.
Creates a linked clone of a Linux virtual machine, performs the guest operating
system customization, and configures one virtual network card.
Creates a linked clone of a Windows virtual machine and performs the guest
operating system customization. Configures up to four virtual network cards
and a local administrator user account.
Creates a linked clone of a Windows virtual machine and performs the guest
operating system customization. Configures one virtual network card and a
local administrator user account.
Linux Customization Clone Workflows
With Linux customization workflows, you can clone a Linux virtual machine and customize the guest
operating system.
You can access the Linux customization clone workflows from Library > vCenter > Virtual Machine
management > Clone > Linux Customization in the Workflows view of the Orchestrator client.
Workflow Name Description
Clone a Linux machine with multiple NICs Clones a Linux virtual machine, performs the guest operating system customization,
and configures up to four virtual network cards.
Clone a Linux machine with a single NIC Clones a Linux virtual machine, performs the guest operating system customization,
and configures one virtual network card.
Tools Clone Workflows
With the tools clone workflows, you can obtain customization information about the operating system of
the virtual machine, information required to update a virtual device, and others.
You can access the tools clone workflows from Library > vCenter > Virtual Machine management >
Clone > Tools in the Workflows view of the Orchestrator client.
Workflow Name Description
Get a virtual Ethernet card to change the
network
Get Linux customization Returns the Linux customization preparation.
Get multiple virtual Ethernet card device
changes
Get NIC setting map Returns the setting map for a virtual network card by using VimAdapterMapping .
Get Windows customization for Sysprep
with credentials
Returns a new ethernet card to update a virtual device. Contains only the device key of
the given virtual device and the new network.
Returns an array of VirtualDeviceConfigSpec objects for add and remove operations
on VirtualEthernetCard objects.
Returns customization information about the Microsoft Sysprep process, with
credentials. Workflows for cloning Windows virtual machines use this workflow.
VMware, Inc. 39
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Get Windows customization for Sysprep
with Unattended.txt
Get Windows customization for Sysprep Returns customization information about the Microsoft Sysprep process. Workflows for
Returns customization information about the Microsoft Sysprep process by using an
Unattended.txt file. Workflows for cloning Windows virtual machines use this
workflow.
cloning Windows virtual machines use this workflow.
Windows Customization Clone Workflows
With the Windows customization clone workflows, you can clone Windows virtual machines and
customize the guest operating system.
You can access the Windows customization clone workflows from Library > vCenter > Virtual Machine
management > Clone > Windows Customization folder and its subfolder in the Workflows view of the
Orchestrator client.
Workflow Name Description
Customize a Windows machine with
single NIC and credential
Clone a thin provisioned Windows
machine with single NIC and
credential
Performs guest operating system customization, configures one virtual network card and a
local administrator user account on a Windows virtual machine.
Clones a Windows virtual machine performing the guest operating system customization.
Configures one virtual network card and a local administrator user account. Sysprep tools
must be available on vCenter Server.
Clone a Windows machine Sysprep
with single NIC and credential
Clone a Windows machine with
multiple NICs and credential
Clone a Windows machine with
single NIC
Clone a Windows machine with
single NIC and credential
Clones a Windows virtual machine performing the guest operating system customization.
Configures one virtual network card and a local administrator user account. Sysprep tools
must be available on vCenter Server.
Clones a Windows virtual machine performing the guest operating system customization.
Configures the local administrator user account and up to four virtual network cards.
Sysprep tools must be available on the vCenter Server system.
Clones a Windows virtual machine performing the guest operating system customization
and configures one virtual network card. Sysprep tools must be available on the
vCenter Server system.
Clones a Windows virtual machine performing the guest operating system customization.
Configures one virtual network card and a local administrator user account. Sysprep tools
must be available on the vCenter Server system.
Device Management Workflows
With the device management workflows, you can manage the devices that are connected to a virtual
machine or to a host datastore.
You can access the device management workflows from Library > vCenter > Virtual Machine
management > Device Management in the Workflows view of the Orchestrator client.
Workflow Name Description
Add CD-ROM Adds a virtual CD-ROM to a virtual machine. If the virtual machine has no IDE controller, the
workflow creates one.
Add disk Adds a virtual disk to a virtual machine.
VMware, Inc. 40
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Change RAM Changes the amount of RAM of a virtual machine.
Convert disks to thin provisioning Converts thick-provisioned disks of virtual machines to thin-provisioned disks.
Convert independent disks Converts all independent virtual machine disks to normal disks by removing the independent
flag from the disks.
Disconnect all detachable devices
from a running virtual machine
Mount CD-ROM Mounts the CD-ROM of a virtual machine. If the virtual machine has no IDE controller or CD-
Mount floppy disk drive Mounts a floppy disk drive FLP file from the ESXi datastore.
Disconnects floppy disks, CD-ROM drives, parallel ports, and serial ports from a running
virtual machine.
ROM drive, the workflow creates them.
Move and Migrate Workflows
With the move and migrate workflows, you can migrate virtual machines.
You can access the move and migrate workflows from Library > vCenter > Virtual Machine
management > Move and Migrate in the Workflows view of the Orchestrator client.
Workflow Name Description
Mass migrate virtual machines
with storage vMotion
Mass migrate virtual machines
with vMotion
Migrate virtual machine with
vMotion
Move virtual machine to another
vCenter Server system
Uses Storage vMotion to migrate a single virtual machine, a selection of virtual machines, or all
available virtual machines.
Uses vMotion, Storage vMotion, or both vMotion and Storage vMotion to migrate a single
virtual machine, a selection of virtual machines, or all available virtual machines.
Migrates a virtual machine from one host to another by using the MigrateVM_Task operation
from the vSphere API.
Moves a list of virtual machines to another vCenter Server system.
Quick migrate multiple virtual
machines
Quick migrate virtual machine Suspends the virtual machine if it is powered on and migrates it to another host using the same
Relocate virtual machine disks Relocates virtual machine disks to another host or datastore while the virtual machine is
Suspends the virtual machines if they are powered on and migrates them to another host using
the same storage.
storage.
powered off by using the RelocateVM_Task operation from the vSphere API.
Other Workflows
With the workflows from the Others category, you can enable and disable Fault Tolerance (FT), extract
virtual machine information, and find orphaned virtual machines.
You can access these workflows from Library > vCenter > Virtual Machine management > Others in
the Workflows view of the Orchestrator client.
Workflow Name Description
Disable FT Disables Fault Tolerance for a specified virtual machine.
Enable FT Enables Fault Tolerance for a specified virtual machine.
VMware, Inc. 41
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Extract virtual
machine information
Find orphaned virtual
machines
Get Virtual Machine
by Name and BIOS
UUID
Get Virtual Machine
by Name and UUID
Get Virtual Machine
UUID
Returns the virtual machine folder, host system, resource pool, compute resource, datastore, hard drive
sizes, CPU and memory, network, and IP address for a given virtual machine. Might require VMware Tools.
Lists all virtual machines in an orphaned state in the Orchestrator inventory. Lists the VMDK and VMTX
files for all datastores in the Orchestrator inventory that have no association with any virtual machines in
the Orchestrator inventory. Sends the lists by email (optional).
Searches virtual machines by name and then filters the result with particular universally unique identifier
(UUID) in order to identify a unique virtual machine.
Note This workflow is needed when DynamicOps calls vRealize Orchestrator workflows having input
parameters of VC:VirtualMachine type in order to make the correspondence between a particular
DynamicOps and vRealize Orchestrator virtual machine.
Searches virtual machines by name and then filters the result with particular universally unique identifier
(UUID) in order to identify a unique virtual machine.
Note This workflow is needed when DynamicOps calls vRealize Orchestrator workflows having input
parameters of VC:VirtualMachine type in order to make the correspondence between a particular
DynamicOps and vRealize Orchestrator virtual machine.
Searches virtual machines by name and then filters the result with particular universally unique identifier
(UUID) in order to identify a unique virtual machine.
Note This workflow is needed when DynamicOps calls vRealize Orchestrator workflows having input
parameters of VC:VirtualMachine type in order to make the correspondence between a particular
DynamicOps and vRealize Orchestrator virtual machine.
Power Management
Workflows
With the power management workflows, you can power on and off virtual machines, reboot the guest
operating system of a virtual machine, suspend a virtual machine, and others.
You can access the power management workflows from Library > vCenter > Virtual Machine
management > Power Management in the Workflows view of the Orchestrator client.
Workflow Name Description
Power off virtual machine and wait Powers off a virtual machine and waits for the process to complete.
Reboot guest OS Reboots the guest operating system of the virtual machine. Does not reset nonpersistent
virtual machines. VMware Tools must be running.
Reset virtual machine and wait Resets a virtual machine and waits for the process to complete.
Resume virtual machine and wait Resumes a suspended virtual machine and waits for the process to complete.
Set guest OS to standby mode Sets the guest operating system to standby mode. VMware Tools must be running.
Shut down and delete virtual machine Shuts down a virtual machine and deletes it from the inventory and disk.
Shut down guest OS and wait Shuts down a guest operating system and waits for the process to complete.
Start virtual machine and wait Starts a virtual machine and waits for VMware Tools to start.
Suspend virtual machine and wait Suspends a virtual machine and waits for the process to complete.
VMware, Inc. 42
Using VMware vRealize Orchestrator Plug-Ins
Snapshot Workflows
With snapshot workflows, you can perform snapshot-related operations.
You can access the snapshot workflows from Library > vCenter > Virtual Machine management >
Snapshot in the Workflows view of the Orchestrator client.
Workflow Name Description
Create a snapshot Creates a snapshot.
Create snapshots of all virtual machines
in a resource pool
Remove all snapshots Removes all existing snapshots without reverting to a previous snapshot.
Remove excess snapshots Finds virtual machines with more than a given number of snapshots and optionally
Remove old snapshots Gets all snapshots that are older than a given number of days and prompts the user to
Remove snapshots of a given size Gets all snapshots that are larger than a given size and prompts the user to confirm
Revert to current snapshot Reverts to the current snapshot.
Revert to snapshot and wait Reverts to a specific snapshot. Does not delete the snapshot.
Creates a snapshot of each virtual machine in a resource pool.
deletes the oldest snapshots. Sends the results by email.
select which ones to delete.
deletion.
VMware Tools Workflows
With VMware Tools workflows, you can perform VMware Tools-related tasks on virtual machines.
You can access the VMware Tools workflows from Library > vCenter > Virtual Machine management >
VMware Tools in the Workflows view of the Orchestrator client.
Workflow Name Description
Mount VMware Tools installer Mounts the VMware Tools installer on the virtual CD-ROM.
Set console screen resolution Sets the resolution of the console window. The virtual machine must be powered
on.
Turn on time synchronization Turns on time synchronization between the virtual machine and the ESXi server
in VMware Tools.
Unmount VMware Tools installer Unmounts the VMware Tools CD-ROM.
Update tools on Windows virtual machine
without rebooting
Upgrade VMware Tools Upgrades VMware Tools on a virtual machine.
Upgrade VMware Tools at next reboot Upgrades VMware Tools on a virtual machine without performing an automatic
VMware, Inc. 43
Updates VMware Tools on a Windows virtual machine without performing a
reboot.
reboot.
Using the vRealize Automation
Plug-In 4
You use the vRealize Automation plug-in to run vRealize Orchestrator workflows from
vRealize Automation.
The workflows provided with the plug-in help you deploy and manage resources from
vRealize Automation. In addition to the provided workflows, you can create an run custom workflows.
This chapter includes the following topics:
n
Introduction to the VMware vRealize Orchestrator Plug-In for vRealize Automation
n
Configuring the vRealize Automation Plug-In
n
Using the vRealize Automation Plug-In Workflows
n
Example vRealize Automation Plug-In Scripts
Introduction to the VMware vRealize Orchestrator Plug-In
for vRealize Automation
The VMware vRealize Orchestrator plug-in for vRealize Automation allows interaction between
vRealize Orchestrator and vRealize Automation.
You can use the vRealize Automation plug-in to create and run workflows for the following
vRealize Automation functions:
n
XaaS custom resource and blueprint management
n
Catalog item and resource management and requesting
n
Entitlement configuration
n
Approval policy configuration
n
Work item interactions
n
vSphere and vCloud Director virtual machine provisioning and post-provisioning actions
n
Create, read, update, and delete (CRUD) operations on the vRealize Automation IaaS model
VMware, Inc.
44
Using VMware vRealize Orchestrator Plug-Ins
Role of vRealize Orchestrator with the vRealize Automation PlugIn
You use the Orchestrator client to run and create workflows and access the plug-in API. You can use
either the embedded vRealize Orchestrator instance in your vRealize Automation installation, or an
external vRealize Orchestrator server.
vRealize Orchestrator powers the vRealize Automation plug-in. vRealize Orchestrator is a development
and process-automation platform that provides a library of extensible workflows to manage the VMware
cloud stack and third party technologies.
vRealize Orchestrator allows integration with management and administration solutions through its open
plug-in architecture.
Configuring the vRealize Automation Plug-In
You add vRealize Automation hosts and IaaS hosts to configure the plug-in.
Configuration Workflows
You can use the workflows in the Configuration workflow categories to manage vRealize Automation
hosts.
vRealize Automation Hosts
You can access these workflows from the Workflows view of the Orchestrator client, in the
Configuration subdirectory of the plug-in library.
Workflow Name Description
Add a vRA host Adds a vRealize Automation host to the plug-in inventory. For tenant management and administration
tasks, you can use the Inventory view to run workflows on each tenant. To use the full function of the
plug-in for a tenant, create a dedicated vRealize Automation host for each tenant.
Add a vRA host using
component registry
Adds a vRealize Automation host to the plug-in inventory with a Per User Session connection. You
must be logged in to the Orchestrator client with the credentials of the vRealize Automation system
administrator.
To use this function with an external vRealize Orchestrator server, you must register the Orchestrator
server in the vRealize Automation component registry.
Note To register an external vRealize Orchestrator server in the component registry, you must
configure Orchestrator to use vRealize Automation as an authentication provider. For more
information, see Installing and Configuring VMware vRealize Orchestrator .
Add the IaaS host of a
vRA host
Remove a vRA host Removes a vRealize Automation host from the plug-in inventory.
VMware, Inc. 45
Adds the IaaS host of the selected vRealize Automation host to the plug-in inventory.
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Update a vRA host Updates a vRealize Automation host in the plug-in inventory.
Validate a vRA host Validates the vRealize Automation host and the connection to it.
Note If your vRealize Orchestrator server is registered in the vRealize Automation component registry, a
vRealize Automation host with the name Default is automatically added. The Default host is using Per
User Session connection to the default tenant. The embedded Orchestrator server in the
vRealize Automation installation is registered in the vRealize Automation component registry by default.
vRealize Automation IaaS Hosts
You can access these workflows from the Workflows view of the Orchestrator client, in the
Infrastructure Administration > Configuration subdirectory of the plug-in library.
The embedded vRealize Orchestrator server in the vRealize Automation installation is registered in the
vRealize Automation component registry by default.
Workflow Name Description
Add an IaaS host Adds a vRealize Automation IaaS host to the plug-in inventory. This workflow is functionally the same as
Add the IaaS host of a vRA host, but does not require a vRealize Automation host.
Remove an IaaS host Removes a vRealize Automation IaaS host from the plug-in inventory.
Update an IaaS host Updates a vRealize Automation IaaS host in the plug-in inventory.
Validate an IaaS host Validates the vRealize Automation IaaS host and the connection to it.
Add a vRealize Automation Host
You can run a workflow to add a vRealize Automation host and configure the host connection parameters.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 Expand Library > vRealize Automation > Configuration.
4 Right-click the Add a vRA host workflow and select Start workflow.
5 Enter a unique name for the host in the Host Name text box.
6 Enter the URL address of the host in the Host URL text box.
For example: https ://hostname .
7 Enter the name of the tenant in the Tenant text box.
To use the full functionality of the plug-in for a tenant, create a dedicated vRealize Automation host for
each tenant.
8 Select whether to install the SSL certificates automatically without user confirmation.
VMware, Inc. 46
Using VMware vRealize Orchestrator Plug-Ins
9 (Optional) To configure the length of time vRealize Orchestrator waits for a connection or response
from vRealize Automation, enter timeout intervals in the Connection timeout (seconds) and
Operation timeout (seconds) text boxes.
10 Select the type of connection to the host from the Session mode drop-down menu.
Option Actions
Shared Session Enter the credentials for a vRealize Automation user in the Authentication
username and Authentication password text boxes.
Per User Session Connect using the credentials of the user that is currently logged in. You must be
logged in to the Orchestrator client with the credentials of the
vRealize Automation system administrator.
To use this option with an external vRealize Orchestrator server, you must register
the Orchestrator server in the vRealize Automation component registry.
Note To register an external vRealize Orchestrator server in the component
registry, you must configure Orchestrator to use vRealize Automation as an
authentication provider. For more information, see Installing and Configuring
VMware vRealize Orchestrator .
11 Click Submit.
What to do next
Add a vRealize Automation Infrastructure Administration host.
Add an IaaS Host
You can run a workflow to add the IaaS host of a vRealize Automation host and configure the connection
parameters.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 Expand Library > vRealize Automation > Infrastructure Administration > Configuration.
4 Right-click Add an IaaS host and select Start workflow.
5 Select the vRealize Automation host for which you want to configure an IaaS host from the vCAC
host drop-down menu.
6 Enter a unique name for the host in the Host Name text box.
7 Enter the URL of the machine on which your Model Manager is installed.
For example: https://model_manager_machine.com .
8 To install the SSL certificates, select Yes.
9 To use a proxy to access your model manager machine, select Yes.
If you select this option, you must provide the proxy host and the proxy port on the following page.
VMware, Inc. 47
Using VMware vRealize Orchestrator Plug-Ins
10 Click Next.
11 If you are configuring an explicit proxy, provide the proxy host URL and the port.
12 Click Next.
13 To configure your own timeout values, click No.
14 (Optional) To configure the length of time vRealize Orchestrator waits for a connection or response
from vRealize Automation, enter timeout intervals in the Connection timeout (seconds) and
Operation timeout (seconds) text boxes.
15 Click Next.
16 Select the host's authentication type.
Option Description
SSO Select this to use vCenter Single Sign-On.
NTLM Select this to enable NT LAN Manager (NTLM) protocol-based authentication only
if your Active Directory infrastructure relies on NTLM authentication.
If you select this option, you must the additional NTLM credentials and
authentication options.
17 If you selected NTLM, click Next and enter the name of the Workstation machine and the NetBIOS
domain name.
18 Click Submit.
Using the vRealize Automation Plug-In Workflows
The vRealize Automation plug-in workflow library contains workflows that you can use for common tasks
such as interacting with the catalog, managing infrastructure, and creating tenants and services.
You can use custom HTTP headers, such as the vRealize Automation specific headers Tasks and
Identity, and apply them in the CRUD, provisioning, and post-provisioning workflows.
Remove Operation Restrictions
Some create, read, update, and delete operations are restricted beginning with version 7.0. If you used
the operations in your workflows in previous versions, they will not work with 7.0 and later. You can
update your workflows to the supported operations or you can re-enable the operations that you need.
To re-enable the operations, you must remove the operations that you want to enable from the
operations.properties file. For a list of the operations in the file, see Restricted Operations .
Procedure
1 From the drop-down menu in vRealize Orchestrator, select Design.
2 Click the Resources view.
3 In the resource hierarchy, expand Library > VCAC > Util.
VMware, Inc. 48
Using VMware vRealize Orchestrator Plug-Ins
4 Create a backup and modify the operations.properties file.
a Right-click operations.properties and select Save to file .
b Save a copy as a backup.
c Create a new copy and delete the operations that you want to re-enable.
d Save the new file.
5 Replace the existing file in vRealize Orchestrator.
a In vRealize Orchestrator, right-click the Util folder and click Import resources .
b Browse to the new version of the operations.properties file and click Open .
c Click Replace once to save your modified version.
6 Restart the vRealize Orchestrator server.
7 Select the operations.properties file and click the Viewer tab.
8 Verify that the operations that you are enabling are no longer in the file.
The operations that you removed from the file now work in your older workflows.
What to do next
As you create new workflows, avoid using the restricted operations.
Restricted Operations
The contents of the operations.properties file contains the restricted operations. To re-enable the
operation, you must remove it from the file.
The following text is the default version of the operations.properties file. To re-enable an operation,
see Remove Operation Restrictions .
#Blueprints
operation.create=ManagementModelEntities.svc@VirtualMachineTemplates
operation.update=ManagementModelEntities.svc@VirtualMachineTemplates
operation.delete=ManagementModelEntities.svc@VirtualMachineTemplates
#Blueprint properties
operation.create=ManagementModelEntities.svc@VirtualMachineProperties
operation.read=ManagementModelEntities.svc@VirtualMachineProperties
operation.update=ManagementModelEntities.svc@VirtualMachineProperties
operation.delete=ManagementModelEntities.svc@VirtualMachineProperties
#Global profiles
operation.create=ManagementModelEntities.svc@GlobalProfiles
operation.read=ManagementModelEntities.svc@GlobalProfiles
operation.update=ManagementModelEntities.svc@GlobalProfiles
operation.delete=ManagementModelEntities.svc@GlobalProfiles
#Global profile properties
operation.create=ManagementModelEntities.svc@GlobalProfileProperties
operation.read=ManagementModelEntities.svc@GlobalProfileProperties
operation.update=ManagementModelEntities.svc@GlobalProfileProperties
operation.delete=ManagementModelEntities.svc@GlobalProfileProperties
VMware, Inc. 49
Using VMware vRealize Orchestrator Plug-Ins
#PropertySetXml
operation.create=ManagementModelEntities.svc@PropertySetXml
operation.read=ManagementModelEntities.svc@PropertySetXml
operation.update=ManagementModelEntities.svc@PropertySetXml
operation.delete=ManagementModelEntities.svc@PropertySetXml
#Property definitions
operation.create=ManagementModelEntities.svc@PropertyDefinitions
operation.read=ManagementModelEntities.svc@PropertyDefinitions
operation.update=ManagementModelEntities.svc@PropertyDefinitions
operation.delete=ManagementModelEntities.svc@PropertyDefinitions
#Property attributes
operation.create=ManagementModelEntities.svc@PropertyAttributes
operation.read=ManagementModelEntities.svc@PropertyAttributes
operation.update=ManagementModelEntities.svc@PropertyAttributes
operation.delete=ManagementModelEntities.svc@PropertyAttributes
#Property Attribute Types
operation.create=ManagementModelEntities.svc@PropertyAttributeTypes
operation.read=ManagementModelEntities.svc@PropertyAttributeTypes
operation.update=ManagementModelEntities.svc@PropertyAttributeTypes
operation.delete=ManagementModelEntities.svc@PropertyAttributeTypes
#Control layouts
operation.create=ManagementModelEntities.svc@ControlLayouts
operation.read=ManagementModelEntities.svc@ControlLayouts
operation.update=ManagementModelEntities.svc@ControlLayouts
operation.delete=ManagementModelEntities.svc@ControlLayouts
#Amazon Virtual Machine Templates
operation.create=AmazonWSModelEntities.svc@AmazonVirtualMachineTemplates
operation.read=AmazonWSModelEntities.svc@AmazonVirtualMachineTemplates
operation.update=AmazonWSModelEntities.svc@AmazonVirtualMachineTemplates
operation.delete=AmazonWSModelEntities.svc@AmazonVirtualMachineTemplates
#Openstack Virtual Machine Templates
operation.create=OpenStackModelEntities.svc@OpenstackVirtualMachineTemplates
operation.read=OpenStackModelEntities.svc@OpenstackVirtualMachineTemplates
operation.update=OpenStackModelEntities.svc@OpenstackVirtualMachineTemplates
operation.delete=OpenStackModelEntities.svc@OpenstackVirtualMachineTemplates
#Endpoint credentials
operation.create=ManagementModelEntities.svc@ConnectionCredentials
operation.update=ManagementModelEntities.svc@ConnectionCredentials
operation.delete=ManagementModelEntities.svc@ConnectionCredentials
#Management endpoints
operation.create=ManagementModelEntities.svc@ManagementEndpoints
operation.update=ManagementModelEntities.svc@ManagementEndpoints
operation.delete=ManagementModelEntities.svc@ManagementEndpoints
#Management endpoint properties
operation.create=ManagementModelEntities.svc@ManagementEndpointProperties
operation.read=ManagementModelEntities.svc@ManagementEndpointProperties
operation.update=ManagementModelEntities.svc@ManagementEndpointProperties
operation.delete=ManagementModelEntities.svc@ManagementEndpointProperties
Using the vRealize Automation Plug-In Inventory
You can use the Inventory view to run workflows on vRealize Automation objects.
VMware, Inc. 50
Using VMware vRealize Orchestrator Plug-Ins
To display the workflows that are available for an inventory object, navigate to Tools > User preferences
> Inventory and select the Use contextual menu in inventory check box. After the option is enabled,
when you right-click an object in the Orchestrator inventory, all available workflows for the object are
displayed.
Using the vRealize Automation Plug-In Administration Workflows
You can use the administration workflows to manage vRealize Automation services, tenants, approval
policies, entitlements, business groups, catalog items, and Advanced Services components.
Some of the workflows include an input parameter for the vRealize Automation host,
vCACCAFE:VCACHost . How you configured the vRealize Automation host connection determines how the
roles are applied when a user runs the workflows.
n
If you configured the connection as a shared session, the user account for the shared session must
have the roles required to run the workflows.
n
If you configured the connection as session per user, the each user who runs the workflows must
have the required roles, just as they would in the vRealize Automation user interface.
You can find these workflows on the Workflows view in the vRealize Orchestrator client, in the Library >
vRealize Automation > Administration subdirectory.
You can use the workflows in the Approval Policies subdirectory to create and manage approval
policies.
Table 4‑ 1. Approval Policies
Workflow Description
Activate an approval policy Activates an approval policy. After you activate an approval
policy, it becomes read-only.
Add an approval level Adds an always required approval level to an approval. You
must select specific users and groups for the approvers.
Copy an approval policy Copies an approval policy.
Create an approval policy Creates a draft approval policy with no levels or approvers. To
create approval levels and designate approvers for your policy,
run the Add an approval level workflow.
Deactivate an approval policy Deactivates an approval policy. You can also delete all existing
entitlements associated with the approval policy.
Delete an approval policy Deletes an approval policy that is in draft state. Active approval
policies are read-only.
You can use the workflows in the Business Groups subdirectory to create and manage business groups
and business group custom properties.
Table 4‑ 2. Business Groups
Workflow Description
Add a custom property Adds a custom property to a business group.
Create a business group Creates a business group.
VMware, Inc. 51
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 2. Business Groups (Continued)
Workflow Description
Delete a business group Deletes a business group.
Delete a custom property Removes a custom property from a business group.
Update a business group Updates details for a business group, such as default machine
prefix, active directory containers, and user roles.
Update a custom property Updates a custom property for a business group.
The Administration subdirectory includes a Business Groups (Deprecated) subdirectory that works with
versions before vRealize Automation 7.0. Use the workflows with the same name in the main folder.
You can use the workflows in the Catalog Items subdirectory to manage catalog items.
Table 4‑ 3. Catalog Items
Workflow Description
Activate a catalog item Activates a catalog item. You must activate and assign a catalog
item to a service before users can request it.
Assign a catalog item to a service Assigns a catalog item to a service. You must activate and
assign a catalog item to a service before users can request it.
Deactivate a catalog item Deactivates a catalog item and removes it from the service
catalog so that users cannot request it.
You can use the workflows in the Composite Blueprint subdirectory to manage composite blueprints
create in the design canvas.
Table 4‑ 4. Composite Blueprint
Workflow Description
Delete a composite blueprint Delete an unpublished blueprint form the Design blueprints list.
Import a composite blueprint Import a composite blueprint from a YAML file.
Publish a composite blueprint Publish a composite blueprint that is in a draft state.
Unpublish a composite blueprint Unpublish a published composite blueprint.
The Content subdirectory workflows are deprecated. Use Cloud Client to perform the import and export
actions. The Cloud Client download and documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
Table 4‑ 5. Content
Workflow Description
Export content (deprecated) Use Cloud Client to perform the import and export actions. The
Cloud Client download and documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
Import content (deprecated) Use Cloud Client to perform the import and export actions. The
Cloud Client download and documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
VMware, Inc. 52
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 5. Content (Continued)
Workflow Description
Transfer content (deprecated) Use Cloud Client to perform the import and export actions. The
Cloud Client download and documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
Validate content (deprecated) Use Cloud Client to perform the import and export actions. The
Cloud Client download and documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
You can use the workflows in the Entitlements subdirectory to create and manage entitlements.
Table 4‑ 6. Entitlements
Workflow Description
Activate an entitlement Activates an entitlement.
Assign catalog items to an entitlement Assigns one or more catalog items to an entitlement. You can
also use this workflow to assign an approval policy.
Assign immediate actions to an entitlement Assigns one or more immediate actions to an entitlement. The
immediate actions do not create requests.
Assign resource actions to an entitlement Assigns one or more resource actions to an entitlement. You can
also use this workflow to assign an approval policy.
Assign services to an entitlement Assigns one or more services to an entitlement. You can also
use this workflow to assign an approval policy.
Assign users and groups to an entitlement Assigns one or more users or groups to an entitlement.
Create an entitlement (deprecated) Creates an entitlement. Use Create and entitlement for
subtenant.
Create an entitlement for subtenant Creates an entitlement.
Deactivate an entitlement Deactivates an entitlement.
Unassign users and groups from an entitlement Remove users and groups from the list of users for an
entitlement.
You can use the workflows in the Properties subdirectory to manage property definitions and property
groups. To avoid conflict with vRealize Automation properties, use a prefix such as a company or feature
name followed by a dot for all custom property names.
Table 4‑ 7. Property Definitions
Workflow Description
Create property definition Creates a custom property.
Delete property definition Deletes a custom property.
Property groups are collections of property definitions.
VMware, Inc. 53
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 8. Property Groups
Workflow Description
Add property to group Adds a defined custom property to a group.
Create property group Creates a property group to which you can add defined custom
properties.
Delete property group Deletes the property group.
Remove properties from group Removes a defined custom property from a property group.
Update property group Modifies the name or description of the property group.
Update property in group Modifies the name, value, and behavior of the property in the
property group.
You can use the workflows in the Services subdirectory to manage services.
Table 4‑ 9. Services
Workflow Description
Activate a service Activates a service.
Assign catalog items to a service Assigns one or more catalog items to a service.
Copy a service Copies a service.
Create a service Creates a service.
Deactivate a service Deactivates a service.
Delete a service Deletes a service.
You can use the workflows in the Tenants subdirectory to create and manage tenants.
The identify store workflows are deprecated. The replacement workflows work with the changes to
vRealize Automation for the Directories Management API.
Table 4‑ 10. Tenants
Workflow Description
Add administrators Adds one or more tenant administrators and infrastructure
administrators to a tenant.
Add an identity store to a tenant Adds an identity store to a tenant of a vRealize Automation host.
You can run this workflow only if you are a system administrator
configuring a tenant.
Add an identity store to a tenant (Deprecated) Use the Add an identity store to a tenant workflow.
Add an identity store to a vCAC host Adds an identity store to a tenant that is configured as a
vRealize Automation host. You can run this workflow only if you
are a tenant administrator configuring an identity store for your
tenant.
Add an identity store to a vCAC host (Deprecated) Use the Add an identity store to a vCAC host workflow.
Create a tenant Creates a tenant. You must select the vRealize Automation host
added with the system administrator credentials.
VMware, Inc. 54
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 10. Tenants (Continued)
Workflow Description
Delete an identity store from a tenant Deletes an identity store from a tenant of a vRealize Automation
host. You can run this workflow only if you are a system
administrator configuring a tenant.
Delete an identity store from a vCAC host Deletes an identity store from a tenant that is configured as a
vRealize Automation host. You can run this workflow only if you
are a tenant administrator configuring identity stores for your
tenant.
Delete a tenant Deletes a tenant.
Remove administrators Removes one or more tenant administrators and infrastructure
administrators from a tenant.
Update an identity store for a tenant Updates an existing identity store for a tenant of a
vRealize Automation host. You can run this workflow only if you
are a system administrator configuring a tenant.
Update an identity store for a tenant (Deprecated) Use the Update an identity store for a tenant workflow.
Update an identity store for a vCAC host Updates an identity store for a tenant that is configured as a
vRealize Automation host. You can run this workflow only if you
are a tenant administrator configuring identity stores for your
tenant.
Update an identity store for a vCAC host (Deprecated) Use the Update an identity store for a vCAC host workflow.
Update a tenant Updates the name, description, and contact email address of an
existing tenant.
You can use the workflows in the Workflow Subscriptions subdirectory to manage the event workflow
subscriptions.
Table 4‑ 11. Workflow Subscriptions
Workflow Description
Delete a workflow subscription Delete an unpublished workflow subscription. This workflow
applies to system and tenant workflow subscriptions.
Export system workflow subscription Export a system workflow subscription and save it as a
vRealize Orchestrator resource element in a JSON format.
A system workflow subscription is a specialized workflow
subscription that reacts to system events and to events in all the
tenants.
Export tenant workflow subscription Export a tenant workflow subscription and save it as a resource
element in a JSON format.
A specialized workflow subscription that runs tenant-specific
workflows.
Import system workflow subscription Import a system workflow subscription from a JSON file. System
workflow subscriptions are triggered for system events and can
be across tenants.
Import tenant workflow subscription Import an exported workflow subscription from a JSON file.
These workflow subscriptions are tenant-specific.
VMware, Inc. 55
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 11. Workflow Subscriptions (Continued)
Workflow Description
Publish a workflow subscription Publish a workflow subscription that was in a draft or
unpublished state. This workflow applies to system and tenant
workflow subscriptions.
Register a system workflow subscription Create a system workflow subscription, including timeout and
priority values.
Register a tenant workflow subscription Create a tenant-specific workflow subscription, including timeout
and priority values.
Unpublish a workflow subscription Unpublish a published workflow subscription. This workflow
applies to system and tenant workflow subscriptions.
Update a workflow subscription Change the name, description, vRealize Orchestrator workflow,
subscription conditions, timeout value, status value, and priority
value. You cannot update the event topic or blocking state.
You can use the workflows in the XaaS Custom Resources subdirectory to create and delete XaaS
custom resources.
Table 4‑ 12. XaaS Custom Resources
Workflow Description
Create custom resource Creates a custom resource.
Delete custom resource Removes a custom resource.
You can use the workflows in the XaaS Resource Actions subdirectory to create and manage XaaS
resource actions.
Table 4‑ 13. XaaS Resource Actions
Workflow Description
Clone resource action Creates a copy of an existing resource action.
Create resource action Creates a resource action.
Delete resource action Deletes a resource action.
Publish resource action Publishes a resource action.
Unpublish resource action Unpublishes a resource action.
You can use the workflows in the XaaS Resource Mappings subdirectory to create and manage XaaS
mappings to non-XaaS resources.
Table 4‑ 14. XaaS Resource Mappings
Workflow Description
Create a resource mapping Map a catalog resource type to a vRealize Orchestrator type.
Delete a resource mapping Delete a resource mapping.
Set a target criteria Specify the conditions that determine the availability of the
resource mapping.
VMware, Inc. 56
Using VMware vRealize Orchestrator Plug-Ins
You can use the workflows in the XaaS Server Configuration subdirectory to manage the target
Orchestrator instance.
Table 4‑ 15. XaaS Server Configuration
Workflow Description
Update Orchestrator server configuration Modify the server settings, including port, host, user name, and
password.
Validate Orchestrator server configuration Verifies that the vRealize Orchestrator settings are valid. The
workflow returns a value of TRUE if the configuration is valid,
and FALSE if the configuration is not valid.
You can use the workflows in the XaaS Service Blueprints subdirectory to create and manage XaaS
blueprints.
Table 4‑ 16. XaaS Blueprints
Workflow Description
Clone a service blueprint Creates a copy of a service blueprint.
Create a service blueprint Creates a service blueprint.
Delete a service blueprint Deletes a service blueprint.
Publish a service blueprint Publishes a service blueprint.
Unpublish a service blueprint Unpublishes a service blueprint.
Using the vRealize Automation Plug-In Infrastructure
Administration Workflows
You can use the infrastructure administration workflows to run basic operations. You use the extensibility
package to customize vRealize Automation with the ability to call vRealize Orchestrator workflows either
as part of the provisioning process, or by using custom operation menus.
You can find the infrastructure administration workflows on the Workflows view of the Orchestrator client,
in the Infrastructure Administration subdirectory of the plug-in library.
You can use the infrastructure administration workflows to provision virtual machines and run basic
create, read, update, or delete operations.
VMware, Inc. 57
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 17. Infrastructure Administration
Workflow Name Description
Await virtual machine state change Awaits a state change for a set of virtual machines. If all virtual
machines are in the success state, a trigger is called and the
workflow ends successfully. If any of the specified virtual
machines gets into the fail state, or does not exist, the workflow
fails. You must enter the success and fail states selecting from
the following options:
n
Requested
n
AwaitingApproval
n
RegisterMachine
n
BuildingMachine
n
AddingDisks
n
MachineProvisioned
n
MachineActivated
n
InstallTools (VMware only)
n
On
n
Off
n
TurningOn
n
TurningOff
n
ShuttingDown
n
Suspending
n
Resetting
n
Rebooting
n
Expired
n
DeactivateMachine
n
UnprovisionMachine
n
Disposing
n
Finalized
Create an IaaS model entity Creates and persists an entity for a specified
vRealize Automation model.
Delete an IaaS model entity Deletes a specified vRealize Automation model entity.
Invoke a post-provisioning action (deprecated) Use the Request a resource action workflow.
Provision a virtual machine from a blueprint (removed in
vRealize Automation 7.0)
Replaced by Request a catalog item or Request a catalog item
with provisioning request.
Read an IaaS entity by custom filter Reads a list of vRealize Automation entities by using a custom
filter. If you do not specify a filter, all entities are returned as a
result.
Read an IaaS entity by system query Reads a list of vRealize Automation entities by using OData
system filters. The system filters apply to the OData URI
convention.
Read an IaaS model entity Reads a vRealize Automation model entity by its ID.
Update an IaaS model entity Updates a vRealize Automation model entity by its ID.
VMware, Inc. 58
Using VMware vRealize Orchestrator Plug-Ins
You use the workflows in the Extensibility subdirectory to customize vRealize Automation with the ability
to call vRealize Orchestrator workflows either as part of the provisioning process, or by custom operation
menus.
The subdirectory also includes workflows for managing IaaS credentials, endpoints, enterprise groups,
machine prefixes, and other entities.
Table 4‑ 18. Extensibility
Workflow Name Description
Install vCO customization Installs an Orchestrator customization, including customized
state change workflows and menu operations workflows.
Uninstall vCO customization Uninstalls an Orchestrator customization, including customized
state change workflows and menu operations workflows.
Change reservation of an IaaS Virtual Machine Changes the attributes, such as reservations and business
groups, of a managed virtual machine.
Import an IaaS Virtual Machine (deprecated) Use Cloud Client. The Cloud Client download and
documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
Import vCenter Virtual Machine (deprecated) Use Cloud Client. The Cloud Client download and
documentation are available at the
https://developercenter.vmware.com/tool/cloudclient.
Unregister virtual machine (removed in vRealize Automation 7.0) No replacement workflow is provided.
Assign a menu operation to a blueprint and its virtual machines
(Deprecated)
Assign a menu operation to virtual machines (Deprecated) Updates a vRealize Automation model entity by its ID.
Assign a state change workflow to a blueprint and its virtual
machines (Deprecated)
Customize a menu operation (removed in vRealize Automation
7.0)
Remove a menu operation from a blueprint and its virtual
machines (removed in vRealize Automation 7.0)
Remove a state change workflow from a blueprint and its virtual
machines
Adds or updates a menu operation on virtual machines.
Alternative non-deprecated workflows include Assign resource
actions to an entitlement and Import a composite blueprint.
Alternative non-deprecated workflows include Assign resource
actions to an entitlement and Import a composite blueprint.
Replaced by event broker subscriptions in vRealize Automation.
No replacement workflow is provided.
No replacement workflow is provided.
Removes a state change workflow from a blueprint and its virtual
machines.
Create a vRealize Automation IaaS Model Entity
You can run a workflow to create a simple or complex vRealize Automation IaaS entity, such as a virtual
machine reference to a user.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
VMware, Inc. 59
Using VMware vRealize Orchestrator Plug-Ins
3 Expand Library > vRealize Automation > Infrastructure Administration.
4 Right-click the Create an IaaS model entity workflow and select Start workflow.
5 Select a vRealize Automation host.
6 Enter the name of the model in the Model name text box.
7 Enter the name of the entity set, in the Entity set name text box.
You use scripting or a REST API to set the Simple properties, Links to complex properties, and HTTP
headers properties.
8 Click Submit to run the workflow.
Read a vRealize Automation IaaS Model Entity
You can run a workflow to read a vRealize Automation IaaS model entity.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 Expand Library > vRealize Automation > Infrastructure Administration.
4 Right-click Read an IaaS model entity and select Start workflow.
5 Select a vRealize Automation host.
6 Enter the name of the model in the Model name text box.
7 Enter the name of the entity set, in the Entity set name text box.
You use scripting or a REST API to set the HTTP headers property.
8 Click Submit to run the workflow.
Using the vRealize Automation Plug-In Requests Workflows
You can use the requests workflows to request catalog items and resource actions, and to complete or
cancel work items.
A work item requires user input or action. For example, a workflow interaction, approval action, or
responding to a reclamation request.
You can access these workflows from the Workflows view of the vRealize Orchestrator client, in the
Requests subdirectory of the plug-in library.
Workflow Description
Cancel a work item Cancels an active work item. You can use this workflow only if you are a system administrator.
Complete a work item Finishes a work item based on provided user input.
Request a catalog
item
VMware, Inc. 60
Requests a catalog item for the user running the workflow.
If you need a workflow to request a composite blueprint, use the Request a catalog with provisioning
request workflow.
Using VMware vRealize Orchestrator Plug-Ins
Workflow Description
Request a catalog
item on behalf of a
user
Request a catalog with
provisioning request
Request a resource
action
Request a resource
action on behalf of a
user
Request a resource
action with a request
template
Sends a request for a catalog item on behalf of a user. You can use this workflow only for catalog items
entitled to both you and the user on behalf of whom you are sending the request.
Requests a composite blueprint as a catalog item for the user running the workflow. If you are providing
customized input to the request, you must customize the workflow. Use this workflow for composite
blueprints.
Requests a resource action for a catalog item owned by the user running the workflow.
Sends a request for a resource action on behalf of a user. You can use this workflow only for resource
actions entitled to both you and the user on behalf of whom you are sending the request.
Requests a resource action that includes complex parameters. The best practice is to duplicate the
workflow and then customize it for the action. You can use the workflow to pass complex parameters or
hidden parameters that you do not want to appear on the request form. One of the primary applications of
this workflow is to customize the IaaS reconfigure virtual machine action.
To create a reconfigure operation on a virtual machine, you must create a copy of the workflow and then
modify the script. Configure the parameters that appear in vRealize Orchestrator and set the
Cafe.Shim.VirtualMachine.Reconfigure.Requestor parameter. This parameter is used for logging
and it must not be empty. See the following example.
var requestTemplate = vCACCAFERequestsHelper.getRequestForResourceAction(operation)
var jsonData =
vCACCAFERequestsHelper.getResourceActionRequestData(requestTemplate);
var json = JSON.parse(jsonData);
//Change cpu example
json.cpu = 2;
//This is a property needed for the Reconfigure IaaS operation:
json["Cafe.Shim.VirtualMachine.Reconfigure.Requestor"] = 1;
vCACCAFERequestsHelper.setResourceActionRequestData(requestTemplate,
JSON.stringify(json));
request =
System.getModule("com.vmware.library.vcaccafe.request").requestResourceActionWithRe
questTemplate(operation, requestTemplate);
Wait for a catalog item
request
Wait for a resource
action request
Wait for a work item Waits for a work item to finish.
Waits for a catalog item request to finish.
Waits for a resource action request to finish.
Using the vRealize Automation Plug-In Sample Workflows
You can use the sample workflows as examples, or as starting points for creating your own custom
workflows.
You can find these workflows on the Workflows view of the vRealize Orchestrator client, in the Sample
subdirectory of the plug-in library.
VMware, Inc. 61
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Create a permission Provides a sample script that interacts with the authorization client and the permission service to create
a permission in vRealize Automation.
Create a tenant Creates a tenant with the same vRealize Automation host and Active Directory configuration as the
default tenant. To run this workflow, select the vRealize Automation host that was added with your
system administrator credentials. You can change the Active Directory settings before running the
workflow.
List catalog items Returns a list of catalog items for the selected tenant.
Print catalog item
provisioning request as
JSON
Retrieves the default request form for a catalog item and adds it to the console log in JSON format.
You can be used the data to customize a provisioning request. You can use the information to modify
the Request a catalog item with a provisioning request workflow.
Access the vRealize Automation Plug-In API
Orchestrator provides an API Explorer to allow you to search the vRealize Automation plug-in API and
see the documentation for JavaScript objects that you can use in scripted elements.
For updated vRealize Automation API documentation, see https://www.vmware.com/support/pubs/vcac-
pubs.html.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Select Tools > API Explorer.
3 Double-click the vCAC and VCACCAFE modules in the left pane to expand the hierarchical list of
vRealize Automation plug-in API objects.
What to do next
You can copy code from API elements and paste it into scripting boxes. For more information about API
scripting, see Developing with VMware vRealize Orchestrator .
For additional information about development best practices, see vRealize Orchestrator Documentation .
Example vRealize Automation Plug-In Scripts
You can cut, paste, and edit the JavaScript examples provided to develop your own custom scripts for
automating vRealize Automation tasks.
CRUD Infrastructure Administration Tasks Example Scripts
You can cut, paste, and edit the JavaScript examples to write scripts for CRUD vRealize Automation
tasks.
For more information about scripting in vRealize Orchestrator, see Developing with VMware vRealize
Orchestrator .
VMware, Inc. 62
Using VMware vRealize Orchestrator Plug-Ins
Example: Create a vRealize Automation Model Entity
This example script performs the following actions:
1 Defines the model name and the entity set name.
2 Defines the properties of the host prefix.
3 Saves the host prefix entity.
4 Defines the properties of the provisioning group.
5 Defines the provisioning group as a link.
6 Saves the provisioning group entity, by linking it with the host name prefix.
Table 4‑ 19. Input Variables
Variable Type
host vCAC:VcacHost
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'HostNamePrefixes';
var links = null;
var headers = null;
//Create properties for prefix entity
var prefixInputProperties = {
MachinePrefix:'test-prefix',
NextMachineNo:1,
MachineNumberLength:3
};
//Save the prefix
var prefixEntity = vCACEntityManager
.createModelEntity(host.id, modelName, entitySetName, prefixInputProperties, links, headers);
entitySetName = 'ProvisioningGroups';
//Create properties for the provisioning group entity
inputProperties = {
GroupName:'TestGroupName',
GroupDescription:'This group was generated with a vCO workflow',
AdministratorEmail:'test@test.com',
AdContainer:'AD',
IsTestGroup:false,
Flags:2,
GroupType:1};
//Add a reference to the newly created prefix entity
links = {
HostNamePrefix:prefixEntity
};
//Save the provisioning group
var entity = vCACEntityManager.createModelEntity(host.id, modelName, entitySetName, inputProperties,
links, headers);
VMware, Inc. 63
Using VMware vRealize Orchestrator Plug-Ins
Example: Update a vRealize Automation Model Entity
This example script performs the following actions:
1 Gets the host ID from the provided entity.
2 Gets the model name from the provided entity.
3 Gets the entity set name from the provided entity.
4 Gets the entity ID from the provided entity.
5 Defines a set of properties that will be updated.
6 Starts the action responsible for updating the entity.
Table 4‑ 20. Input Variables
Variable Type
entity vCAC:Entity
updatedDescription
var hostId = entity.hostId;
var modelName = entity.modelName;
var entitySetName = entity.entitySetName;
var entityIdString = entity.keyString;
var links = null;
var headers = null;
var updateProperties = new Properties();
updateProperties.put("UserNameDescription", updatedDescription);
//Update the user description
System.getModule("com.vmware.library.vcac")
.updateVCACEntity(hostId, modelName, entitySetName, entityIdString, updateProperties, links,
headers);
String
Example: Read a vRealize Automation Model Entity
This example script performs the following actions:
1 Defines the model name and the entity set name.
2 Defines the blueprint ID with a property object.
3 Reads the entity.
VMware, Inc. 64
Using VMware vRealize Orchestrator Plug-Ins
Table 4‑ 21. Input Variables
Variable Type
host vCAC:VcacHost
blueprintID
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'VirtualMachineTemplates';
var links = null;
var headers = null;
//Create properties for the prefix entity
var blueprintId = {
VirtualMachineTemplateID:blueprintId,
};
//Read the blueprint
var entity = vCACEntityManager
.readModelEntity(host.id, modelName, entitySetName, blueprintId, headers);
String
Example: Delete a vRealize Automation Model Entity
This example script performs the following actions:
1 Gets the host ID from the provided entity.
2 Gets the model name from the provided entity.
3 Gets the entity set name from the provided entity.
4 Gets the entity ID from the provided entity.
5 Starts the action responsible for deleting the entity.
Table 4‑ 22. Input Variables
Variable Type
entity vCAC:Entity
var hostId = entity.hostId;
var modelName = entity.modelName;
var entitySetName = entity.entitySetName;
var entityKeyString = entity.keyString;
var headers = null;
//Delete the entity
System.getModule("com.vmware.library.vcac")
.deleteVCACEntity(hostId, modelName, entitySetName, entityKeyString, headers);
Example: Read a vRealize Automation Entity by Custom Filter
This example script performs the following actions:
1 Defines the model name and the entity set name.
2 Defines the properties by which the entities are filtered.
VMware, Inc. 65
Using VMware vRealize Orchestrator Plug-Ins
3 Reads a list of entities.
Table 4‑ 23. Input Variables
Variable Type
host vCAC:VcacHost
templateName
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'VirtualMachineTemplates';
var headers = null;
//Create properties for prefix entity
var properties = {
VirtualMachineTemplateName:templateName,
};
//Read a list of entities
var entities = vCACEntityManager
.readModelEntitiesByCustomFilter(host.id, modelName, entitySetName, properties, headers);
String
Example: Read a vRealize Automation Entity by System Query
This example script performs the following actions:
1 Defines the model name and the entity set name.
2 Defines the system queries by which the entities are filtered and selects the top ten results of all
virtual machines, filtered by the machine state and component flag.
3 Reads a list of entities.
Table 4‑ 24. Input Variables
Variable Type
host vCAC:VcacHost
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'VirtualMachines';
var filter = "VirtualMachineState eq 'Off' and IsComponent eq true";
var orderBy = 'VirtualMachineName asc';
var top = 10; {
var skip = 0;,
var headers = null;
var select = null;
var entities = vCACEntityManager
readModelEntitiesBySystemQuery(host.id, modelName, entitySetName, filter, orderBy, select, top,
skip, headers);
VMware, Inc. 66
Using VMware vRealize Orchestrator Plug-Ins
Finding vRealize Automation Entities Example Scripts
You can cut, paste, and edit the JavaScript examples to write scripts for finding vRealize Automation
entities by using the vCACCAFEEntitiesFinder scripting utility object.
For more information about scripting in vRealize Orchestrator, see Developing with VMware vRealize
Orchestrator .
Example: Find Catalog Resources Filtered by Name
Table 4‑ 25. Input Variables
Variable Type
host vCACCAFE:VcacHost
You can use one the following examples:
n
This example script gets all catalog resources for the target host matching the query of
name_of_the_resource by name and description.
var items = vCACCAFEEntitiesFinder.findCatalogResources(host, "name_of_the_resource ");
n
This example script performs the following actions:
a Gets the Consumer Resource service and invokes the get method passing as a Pageable
parameter an instance of the vCACCAFEPageOdataRequest object.
b Creates the vCACCAFEPageOdataRequest object by providing an OData query as a single filter of
the name attribute matching the name_of_the_resource string.
var service = host.createCatalogClient().getCatalogConsumerResourceService();
var filter = new Array();
filter[0] = vCACCAFEFilterParam.equal("name", vCACCAFEFilterParam.string("name_of_the_resource "));
var query = vCACCAFEOdataQuery.query().addFilter(filter);
var items = service.getResourcesList(new vCACCAFEPageOdataRequest(query));
Example: Find Catalog Resources Filtered by Owner
This example script performs the following actions:
1 Gets the Consumer Resource service and invokes the get method passing as a Pageable parameter
an instance of the vCACCAFEPageOdataRequest object.
2 Creates the vCACCAFEPageOdataRequest object by providing an OData query as a single filter of the
owner/ref attribute matching the user@domain.com string.
VMware, Inc. 67
Using VMware vRealize Orchestrator Plug-Ins
The owners/ref attribute is a composition based on the internal structure and fields of the catalog
resources. The vCACCAFECatalogResource entity has the owners attribute, which is a collection of
vCACCAFECatalogPrincipal entities. The vCACCAFECatalogPrincipal entity has the ref property,
which is a string representation of the principal id of the user.
var filter = new Array();
filter[0] = vCACCAFEFilterParam.substringOf("owners/ref",
vCACCAFEFilterParam.string("user@domain.com "));
var query = vCACCAFEOdataQuery.query().addFilter(filter);
var items = service.getResourcesList(new vCACCAFEPageOdataRequest(query));
Example: Find Catalog Resources Filtered by Name and Owner
This example script combines the OData queries from the previous two examples into a single one
condition by using the vCACCAFEFilterParam.and(array of conditions) logic operator.
var conditions = new Array();
conditions[0] = vCACCAFEFilterParam.equal("name",
vCACCAFEFilterParam.string("name_of_the_resource_here"));
conditions[1] = vCACCAFEFilterParam.substringOf("owners/ref",
vCACCAFEFilterParam.string("user@domain.com"));
var filter = new Array();
filter[0] = vCACCAFEFilterParam.and(conditions);
var query = vCACCAFEOdataQuery.query().addFilter(filter);
var items = service.getResourcesList(new vCACCAFEPageOdataRequest(query));
You can define other conditions by using different logic operators such as
vCACCAFEFilterParam.group(array of parameters), vCACCAFEFilterParam.not(parameter),
vCACCAFEFilterParam.startsWith(id, string), vCACCAFEFilterParam.endsWith(id, string),
vCACCAFEFilterParam.greaterThan(id, number), vCACCAFEFilterParam.lessThan(id,
number), and so on.
Get a Resource Provisioned by vRealize Automation Example
Script
You can cut, paste, and edit the JavaScript example to write scripts for retrieving the actual entities of
vRealize Automation provisioned resources.
The CatalogResource type represents the provisioned resources in vRealize Automation. This type has
an attribute of ProviderBinding type which represents the relation between the catalog resource and its
provider with the following attributes:
n
bindingId - represents the identifier of the entity which is unique for the provider
VMware, Inc. 68
Using VMware vRealize Orchestrator Plug-Ins
n
providerRef - identifies the catalog provider which corresponds directly to a service registered in
thevRealize Automation component registry
For more information about scripting in vRealize Orchestrator, see Developing with VMware vRealize
Orchestrator .
Example: Get a Virtual Machine Provisioned as a vRealize Automation
Catalog Resource
This example uses a vRealize Automation host and its IaaS host as input parameters and, for a provided
resource id, returns the corresponding IaaS virtual machine. The scripting code takes only catalog
resources of Virtual Machine type that are provisioned by the iaas-service provider.
Table 4‑ 26. Input Variables
Variable Type
vcacHost vCACCAFE:VCACHost
iaasHost vCAC:VCACHost
// Id of the catalog resource (or vCACCAFECatalogResource_instance.getId())
var resourceId = "c222629c-6f90-4458-8c92-8ece0ba06173";
var resource = vCACCAFEEntitiesFinder.getCatalogResource(vcacHost, resourceId);
var resourceType = resource.getResourceTypeRef().getLabel();
System.log("resource type: " + resourceType);
var providerBinding = resource.getProviderBinding();
var bindingId = providerBinding.getBindingId();
System.log("provider binding id: " + bindingId);
var provider = providerBinding.getProviderRef();
System.log("provider id: " + provider.getId());
System.log("provider name: " + provider.getLabel());
if ((resourceType == "Virtual Machine") && (provider.getLabel() == "iaas-service")) {
System.log("It is an IaaS VM!");
// IaaS virtual machine
var vm = Server.findForType("vCAC:VirtualMachine", bindingId);
System.log("IaaS VM id: " + vm.virtualMachineID);
System.log("IaaS VM name: " + vm.displayName);
// IaaS Entity
var entity = System.getModule("com.vmware.library.vcac").getVirtualMachineEntityFromId(iaasHost,
bindingId);
System.log("IaaS entity id: " + entity.keyString);
}
VMware, Inc. 69
Using VMware vRealize Orchestrator Plug-Ins
Common Tasks Example Scripts
You can cut, paste, and edit the JavaScript examples, or use them as samples to help you learn to
develop your own scripts for common vRealize Automation tasks.
For more information about scripting in vRealize Orchestrator, see Developing with VMware vRealize
Orchestrator .
Example: Create a vRealize Automation Advanced Service Blueprint
This example script performs the following actions:
1 Sets the vRealize Orchestrator workflow used to build the service blueprint.
2 Generates the content for the service blueprint based on the workflow.
3 Creates the service blueprint entity.
4 Publishes the service blueprint.
Table 4‑ 27. Input Variables
Variable Type
host vCACCAFE:VCACHost
//ID of the workflow used to create the service blueprint
var workflowId = "44e42047-2fa0-4e4a-ba0c-12086540b28b";
var name = "MyBlueprint"
var description = "Blueprint description";
var workflowClient = host.createAdvancedDesignerClient().getAdvancedDesignerWorkflowService();
//Generate a service blueprint based on the workflow ID
var blueprint = workflowClient.generateServiceBlueprintByWorkflowId(workflowId);
blueprint.setTenant(host.tenant);
blueprint.setName(name);
blueprint.setDescription(description);
//Create the service blueprint
var blueprintService =
host.createAdvancedDesignerClient().getAdvancedDesignerServiceBlueprintService();
var uri = blueprintService.createServiceBlueprint(host.tenant , blueprint);
//Publish the service blueprint
var createdBlueprint = blueprintService.getServiceBlueprintByUri(uri);
blueprintService.updateServiceBlueprintStatus(host.tenant, createdBlueprint.getId(),
vCACCAFEDesignerPublishStatus.PUBLISHED);
VMware, Inc. 70
Using VMware vRealize Orchestrator Plug-Ins
Example: Create a vRealize Automation Approval Policy
This example script performs the following actions:
1 Gets the approval policy type.
2 Sets the user and group whose approval is required.
3 Sets the approval levels.
4 Defines the pre-provisioning approval phase.
5 Defines the post-provisioning approval phase.
6 Defines the approval policy specifications such as name, description, and type.
7 Creates the approval policy.
8 Publishes the approval policy. Once an approval policy is published, it becomes read-only.
Table 4‑ 28. Input Variables
Variable Type
host vCACCAFE:VCACHost
// Get the type of approval policy by ID
var typeService = host.createApprovalClient().getApprovalApprovalPolicyTypeService();
var type = typeService.getApprovalPolicyType("com.vmware.cafe.catalog.request");
// Set the user and group required to complete the approval
var user = new vCACCAFEApprovalPrincipal();
user.setValue("user@domain.com");
user.setType(vCACCAFEApprovalPrincipalType.USER);
var group = new vCACCAFEApprovalPrincipal();
group.setValue("group@domain.com");
group.setType(vCACCAFEApprovalPrincipalType.GROUP);
// Set the level of the approval
var level = new vCACCAFEApprovalLevel();
level.setName("IT Approval Level");
level.setDescription("IT Approval Level description");
level.setApprovalMode(vCACCAFEApprovalMode.ALL);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(level, "getApprovers", user);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(level, "getApprovers", group);
level.setLevelNumber(1);
// Set pre-provisioning phase type and the phase of the approval
var phase1Type = new vCACCAFEApprovalPhaseType();
phase1Type.setId("com.vmware.cafe.catalog.request.pre");
phase1Type.setName("Pre-Provisioning type");
phase1Type.setDescription("Pre-Provisioning type description");
phase1Type.setPhaseOrder(1);
var phase1 = new vCACCAFEPhase();
VMware, Inc. 71
Using VMware vRealize Orchestrator Plug-Ins
phase1.setName("Pre-Provisioning");
phase1.setDescription("Pre provisioning phase");
phase1.setPhasetype(phase1Type);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(phase1, "getLevels", level);
// Set post-provisioning phase type and the phase of the approval
var phase2Type = new vCACCAFEApprovalPhaseType();
phase2Type.setId("com.vmware.cafe.catalog.request.post");
phase2Type.setName("Post-Provisioning type");
phase2Type.setDescription("Post-Provisioning type description");
phase2Type.setPhaseOrder(1);
var phase2 = new vCACCAFEPhase();
phase2.setName("Post-Provisioning");
phase2.setDescription("Post provisioning phase");
phase2.setPhasetype(phase2Type);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(phase2, "getLevels", level);
// Create the approval policy specifications
var spec = new vCACCAFEApprovalPolicy();
spec.setName("New Policy");
spec.setDescription("New Policy description");
spec.setPolicyType(type);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(spec, "getPhases", phase1);
System.getModule("com.vmware.library.vcaccafe.util").addElementToList(spec, "getPhases", phase2);
// Create the approval policy
var approvalPolicyService = host.createApprovalClient().getApprovalApprovalPolicyService();
var approvalPolicy = approvalPolicyService.createPolicy(spec);
// Publish the approval policy
approvalPolicy.setState(vCACCAFEApprovalPolicyState.PUBLISHED);
approvalPolicy = approvalPolicyService.update(approvalPolicy);
System.log("New approval policy id: " + approvalPolicy.getId());
VMware, Inc. 72
Using the Configuration Plug-In 5
In addition to configuring Orchestrator by using Control Center, you can modify the Orchestrator server
configuration settings by running workflows from the Configuration plug-in.
With the Configuration plug-in, you can configure and manage the Orchestrator server keystores and
trusted certificates.
This chapter includes the following topics:
n
Access the Configuration Plug-In Workflow Library
n
Configuration Plug-In Workflow Library
Access the Configuration Plug-In Workflow Library
You must use the Orchestrator client to access the elements from the Configuration plug-in workflow
library.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 Expand the hierarchical list to Library > Configuration.
What to do next
Review the workflow library.
Configuration Plug-In Workflow Library
The Configuration plug-in workflow library contains workflows that you can use to run automated
processes related to the configuration of vRealize Orchestrator.
SSL Trust Manager Workflows
The SSL Trust Manager category contains workflows that you can use for deleting and importing SSL
certificates.
You access these workflows from Library > Configuration > SSL Trust Manager workflows in the
Workflows view of the Orchestrator client.
VMware, Inc.
73
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Delete a trusted certificate Deletes an SSL certificate from the server trust store.
Import certificate from URL Imports an SSL certificate from a URL into the server trust store.
Import a certificate from URL using authenticated
proxy server
Import certificate from URL using proxy server Imports an SSL certificate from a URL that is reachable through a proxy server.
Import certificate from URL with certificate alias Imports an SSL certificate from a URL into the server trust store.
Import trusted certificate from a file Imports an SSL certificate from a file into the server trust store.
Imports an SSL certificate from a URL that is reachable through an
authenticated proxy server.
Keystore Workflows
You access the Keystore configuration workflows from Library > Configuration > Keystores in the
Workflows view of the Orchestrator client.
Workflow Name Description
Add certificate Adds a certificate to a keystore.
Add key Adds a key.
Create a keystore Creates a new keystore.
Delete a keystore Deletes a keystore.
Delete certificate Deletes a certificate from a keystore.
Delete entry Deletes an entry.
Delete key Deletes a key.
VMware, Inc. 74
Using the Library Plug-In 6
You can use the Library plug-in workflows as templates for customization and automation of client
processes, and to troubleshoot Orchestrator.
Library Plug-In Workflows
The Library plug-in provides workflows in the Locking , Orchestrator , and Troubleshooting workflow
categories.
Locking Workflows
You access these workflows from Library > Locking in the Workflows view of the Orchestrator client.
Workflow Name Description
Display all locks Shows all locks.
Locking test A test workflow that creates a lock.
Locking test (x5) A test workflow that creates five locks.
Release all locks Releases all locks.
Orchestrator Task Workflows
You access these workflows from Library > Orchestrator > Tasks in the Workflows view of the
Orchestrator client.
Workflow Name Description
Create recurrent task Creates a recurrent task and returns the newly created task.
Create task Schedules a workflow to run at a later time and date, as a task.
Orchestrator Workflows
You access these workflows from Library > Orchestrator > Workflows in the Workflows view of the
Orchestrator client.
VMware, Inc.
75
Using VMware vRealize Orchestrator Plug-Ins
Workflow Name Description
Refresh stale
workflow runs in
waiting state
Start workflows in a
series
Start workflows in
parallel
Processes all workflow runs that are in waiting state for the specified remote server and updates the
workflow state according to the remote workflow run. You can use this workflow if there is data loss
between the workflow runs, for example, when there is loss of connectivity between the Orchestrator
servers.
Runs a workflow multiple times in a series, one instance after the other. You provide workflow parameters
in an array. You also provide a property list, with one property per workflow input, for each instance of the
workflow that starts. The number of properties in the array define the number of workflow runs.
Runs a workflow multiple times, with different parameters. You provide workflow parameters in an array.
You also provide a property list, with one property per workflow input, for each instance of the workflow that
starts. The number of properties in the array define the number of workflow runs.
Tagging Workflows
You access these workflows from Library > Tagging in the Workflows view of the Orchestrator client.
Workflow Name Description
Find objects by tag Finds objects by the tags assigned to them. You provide the names and values of the tags and the workflow
returns a list of the objects to which these tags apply.
List workflow tags Lists the tags assigned to the workflow you specified as an input parameter.
Tagging example Demonstrates workflow tagging.
Tag workflow Assigns a tag to a workflow. You must specify the workflow you want to tag and the tag name and value.
Untag workflow Removes a tag from a workflow. You must specify the workflow you want to untag and the tag you want to
remove from the specified workflow.
VMware, Inc. 76
Using the SQL Plug-In 7
You can use the API that the SQL plug-in provides to implement connectivity to SQL databases and other
tabular data sources, such as spreadsheets or flat files.
The SQL plug-in API which is based on JDBC, provides a call-level API for SQL-based database access.
The SQL plug-in also provides sample workflows that demonstrate how to use the API in workflows.
This chapter includes the following topics:
n
Configuring the SQL Plug-In
n
Running the SQL Sample Workflows
n
Using the SQL Plug-In Standard Workflows
Configuring the SQL Plug-In
You can use the workflows included in the SQL plug-in and run them from the Orchestrator client to
configure the SQL plug-in and to add, update, or remove a database.
SQL Plug-In Configuration Workflows
The Configuration workflow category of the SQL plug-in contains workflows that allow you to manage
databases and database tables.
You can access these workflows from Library > SQL > Configuration in the Workflows view of the
Orchestrator client.
Workflow Name Description
Add a database Adds a database object to the Database plug-in inventory.
Add tables to a database Adds database tables to a database in the Database plug-in inventory.
Remove a database Removes a database object from the Database plug-in inventory.
Remove a table from a database Removes a database table from a database in the Database plug-in inventory.
Update a database Updates the configuration of a database object in the Database plug-in inventory.
Validate a database Validates a database in the Database plug-in inventory.
VMware, Inc. 77
Using VMware vRealize Orchestrator Plug-Ins
Add a Database
You can run a workflow to add a database to the Orchestrator server and configure the host connection
parameters.
When you add a database that requires a secure connection, you must import the database SSL
certificate. You can import the SSL certificate under the Trusted Certificates tab in Control Center.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Click the Workflows view in the Orchestrator client.
3 In the workflows hierarchical list, expand Library > SQL > Configuration and navigate to the Add a
database workflow.
4 Right-click the Add a database workflow and select Start workflow.
5 In the Name text box, type the name of the database.
6 Select the type of the database.
7 In the Connection URL text box, type the address of the database.
Database Type Syntax
Oracle
Microsoft SQL (with SQL
authentication)
Microsoft SQL (with Windows account
authentication)
PostgreSQL
MySQL
jdbc:oracle:thin:@database_url:port_number :SID
jdbc:jtds:sqlserver://database_url:port_number /database_name
jdbc:jtds:sqlserver://database_url:port_number /database_name ;useN
TLMv2=true ;domain=domain_name
jdbc:postgresql://database_url:port_number /database_name
jdbc:mysql://database_url:port_number /database_name
8 Select the session mode that the plug-in uses to connect to the database.
Option Description
Shared Session The plug-in uses shared credentials to connect to the database. You must provide
the database credentials for the shared session.
Session Per User The Orchestrator client retrieves credentials from the user who is logged in.
Note To use session per user mode, you must authenticate by using a user
name only. You should not use domain\user or user@domain for authentication.
9 Click Submit to run the workflow.
After the workflow runs successfully, the database and all tables that belong to it appear in the Inventory
view.
VMware, Inc. 78
Using VMware vRealize Orchestrator Plug-Ins
Add Tables to a Database
You can run a workflow to add tables to a database that is in the Database plug-in inventory.
Prerequisites
n
Verify that you are logged in to the Orchestrator client as an administrator.
n
Verify that you have a connection to a database from the Inventory view.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SQL > Configuration and navigate to the Add
tables to a database workflow.
3 Right-click the Add tables to a database workflow and select Start workflow.
4 Select a database to which to add tables.
5 Select the tables that you want to add.
6 Click Submit to run the workflow.
After the workflow runs successfully, the added database tables appear in the Inventory view of the
Orchestrator client.
Update a Database
You can run a workflow to update the configuration of a database that is in the plug-in inventory.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Click the Workflows view in the Orchestrator client.
3 In the Workflows hierarchical list, expand Library > SQL > Configuration and navigate to the
Update a database workflow.
4 Right-click the Update a database workflow and select Start workflow.
5 Select a database that you want to update.
6 In the Name text box, type the new name of the database.
The database appears in the Inventory view with the name that you specify.
7 Select the type of the database.
8 In the Connection URL text box, type the new address of the database.
VMware, Inc. 79
Using VMware vRealize Orchestrator Plug-Ins
9 Select the session mode that the plug-in uses to connect to the database.
Option Description
Shared Session The plug-in uses shared credentials to connect to the database. You must provide
the database credentials for the shared session.
Session Per User The Orchestrator client retrieves credentials from the user who is logged in.
Note To use session per user mode, you must authenticate by using a user
name only. You should not use domain\user or user@domain for authentication.
10 Click Submit to run the workflow.
Running the SQL Sample Workflows
You can run the SQL plug-in workflows to perform JDBC operations such as generating a JDBC URL,
testing a JDBC connection, and managing rows in JDBC tables. You can also run the SQL plug-in
workflows to manage databases and database tables, as well as to run SQL operations.
Generate a JDBC URL
You can run a workflow from the Orchestrator client to generate a JDBC connection URL.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC to navigate to the JDBC URL generator
workflow.
3 Right-click the JDBC URL generator workflow and select Start workflow.
4 Select the type of database for which to generate a URL.
Note If you use a Microsoft database, you might have to click Next and to provide the database
instance name and database user domain name.
5 Provide the required information to generate a database URL.
a Type a database server name or IP address.
b Type a database name.
c (Optional) Type a database port number.
If you do not specify a port number, the workflow uses a default port number.
d Type a user name to access the database.
e Type a password to access the database.
VMware, Inc. 80
Using VMware vRealize Orchestrator Plug-Ins
6 Click Submit to run the workflow.
Test a JDBC Connection
You can run a workflow from the Orchestrator client to test the connection to a database.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC connection example workflow.
3 Right-click the JDBC connection example workflow and select Start workflow.
4 Provide the required information to test a database connection.
a Type a user name to access the database.
b Type the URL to test.
c Type a password to access the database.
5 Click Submit to run the workflow.
Create a Table by Using JDBC
You can run a workflow from the Orchestrator client to create a database.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC create table example workflow.
3 Right-click the JDBC create table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a password to access the database.
b Type a database connection URL.
c Type a user name to access the database.
VMware, Inc. 81
Using VMware vRealize Orchestrator Plug-Ins
5 Type an SQL create statement.
An example syntax is:
CREATE TABLE "table_name"
("column1" "data_type_for_column1",
"column2" "data_type_for_column2")
6 Click Submit to run the workflow.
Insert a Row into a JDBC Table
You can run a workflow from the Orchestrator client to test the insertion of a row into a JDBC table.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC insert into table example workflow.
3 Right-click the JDBC insert into table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a database connection URL.
b Type a user name to access the database.
c Type a password to access the database.
5 Type an SQL insert statement, and click Next.
An example syntax is:
INSERT INTO "table_name " ("column1", "column2")
VALUES ("value1", "value2")
6 Type the values to insert into the row.
7 Click Submit to run the workflow.
Select Rows from a JDBC Table
You can run a workflow from the Orchestrator client to select rows from a JDBC table.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
VMware, Inc. 82
Using VMware vRealize Orchestrator Plug-Ins
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC select from table example workflow.
3 Right-click the JDBC select from table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a database connection URL.
b Type a user name to access the database.
c Type a password to access the database.
5 Type an SQL select statement.
An example syntax is:
SELECT * FROM "table_name "
6 Click Submit to run the workflow.
Delete an Entry from a JDBC Table
You can run a workflow from the Orchestrator client to test the deletion of an entry from a JDBC table.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC delete entry from table example workflow.
3 Right-click the JDBC delete entry from table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type the first name of the user entry to be deleted.
b Type a user name to access the database.
c Type a JDBC connection URL.
d Type the last name of the user entry to be deleted.
e Type a password to access the database.
VMware, Inc. 83
Using VMware vRealize Orchestrator Plug-Ins
5 Type an SQL delete statement.
An example syntax is:
DELETE FROM "table_name " where ("column1" = ?, "column2" = ?)
6 Click Submit to run the workflow.
Delete All Entries from a JDBC Table
You can run a workflow from the Orchestrator client to delete all entries from a JDBC table.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC delete all from table example workflow.
3 Right-click the JDBC delete all from table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a database connection URL.
b Type a user name to access the database.
c Type a password to access the database.
5 Type an SQL delete statement.
An example syntax is:
DELETE FROM "table_name"
6 Click Submit to run the workflow.
Drop a JDBC Table
You can run a workflow from the Orchestrator client to test the dropping of a JDBC table.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
VMware, Inc. 84
Using VMware vRealize Orchestrator Plug-Ins
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the
JDBC drop table example workflow.
3 Right-click the JDBC drop table example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a password to access the database.
b Type a database connection URL.
c Type a user name to access the database.
5 Type an SQL drop statement.
An example syntax is:
DROP TABLE "table_name"
6 Click Submit to run the workflow.
Run a Complete JDBC Cycle
You can run a workflow from the Orchestrator client to test all JDBC example workflows in one full cycle.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run JDBC
workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > JDBC > JDBC Examples to navigate to the Full
JDBC cycle example workflow.
3 Right-click the Full JDBC cycle example workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type a database connection URL.
b Type a user name to access the database.
c Type a password to access the database.
5 Type the values to be used as entries in the database.
6 Click Submit to run the workflow.
Using the SQL Plug-In Standard Workflows
You can use the SQL workflows to run SQL operations.
VMware, Inc. 85
Using VMware vRealize Orchestrator Plug-Ins
SQL Plug-In Workflow Library
You can run the SQL plug-in workflows to manage databases and database tables and to run SQL
operations.
You can access the database configuration workflows from Library > SQL > Configuration in the
Workflows view of the Orchestrator client.
Workflow Name Description
Add a database Adds a database object to the plug-in inventory.
Add tables to a database Adds database tables to a database in the plug-in inventory.
Remove a database Removes a database object from the plug-in inventory.
Remove a table from a database Removes a database table from a database in the plug-in inventory.
Update a database Updates the configuration of a database object in the plug-in inventory.
Validate a database Validates a database in the plug-in inventory.
You can access the SQL operations workflows from Library > SQL in the Workflows view of the
Orchestrator client.
Workflow Name Description
Execute a custom query on a
database
Generate CRUD workflows for a table Generates Create, Read, Update, and Delete workflows for a particular table.
Read a custom query from a
database
Runs a custom query on a specified database and returns the number of affected rows.
You can run the workflow to update, delete, insert, and write queries.
Runs a custom query on a specified database and returns the result in an array of
properties. You can run the workflow to select and read queries.
Generate CRUD Workflows for a Table
You can run a workflow to generate Create, Read, Update, and Delete workflows for a particular table.
Prerequisites
n
Verify that you are logged in to the Orchestrator client as an administrator.
n
Verify that you have a connection to a database from the Inventory view.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SQL and navigate to the Generate CRUD
workflows for a table workflow.
3 Right-click the Generate CRUD workflows for a table workflow and select Start workflow.
4 Select a table for which to generate the workflows.
5 Select the workflow folder in which to generate the workflows.
VMware, Inc. 86
Using VMware vRealize Orchestrator Plug-Ins
6 Select whether to overwrite any existing workflows.
Option Description
Yes The generated workflows overwrite existing workflows with the same name.
No New workflows are not generated if workflows with the same name exist in the
folder.
7 (Optional) Select columns that should not be populated.
You cannot edit the selected columns with the generated CRUD workflows.
8 Click Submit to run the workflow.
After the workflow runs successfully, the CRUD workflows appear in the selected workflow folder.
What to do next
You can run the generated workflows on the selected database table.
VMware, Inc. 87
Using the SSH Plug-In 8
You can use the SSH plug-in workflows to run SSH commands on a remote host that supports SSH and
transfer files between an Orchestrator server and a remote host through a secure connection.
This chapter includes the following topics:
n
Configure the SSH Plug-In
n
Running the SSH Plug-In Sample Workflows
Configure the SSH Plug-In
You can set up the SSH plug-in to ensure encrypted connections.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Click the Workflows view in the Orchestrator client.
3 In the workflows hierarchical list, expand Library > SSH and navigate to the Add SSH host workflow.
4 Right-click the Configure mail workflow and select Start workflow.
5 In the Host name text box, enter the name of the host that you want to access with SSH through
Orchestrator.
6 Enter the target port. The default SSH port is 22.
The host is added to the list of SSH connections.
7 (Optional) Configure an entry path on the server.
a Click New root folder .
b Enter the new path and click Insert value .
8 Enter the user name for a user who has the necessary permissions to run SSH commands.
9 Select the authentication type.
Option Action
Yes Enter a password to use password authentication.
No Enter the path to the private key and the private key passphrase to use key
authentication.
VMware, Inc.
88
Using VMware vRealize Orchestrator Plug-Ins
10 Click Submit to run the workflow.
The SSH host is available in the Inventory view of the Orchestrator client.
Configuration Workflows
The Configuration category of the SSH plug-in contains workflows that let you manage the connections
between Orchestrator and SSH hosts.
You can access these workflows from Library > SSH > Configuration in the Workflows view of the
Orchestrator client.
Workflow Name Description
Add a Root Folder to SSH Host Adds a root folder to an existing connection to an SSH host.
Add SSH Host Adds a new connection to an SSH host to the existing configuration.
Remove a Root Folder from SSH Host Removes a root folder from an existing connection to an SSH host.
Remove SSH Host Removes an existing connection to an SSH host from the existing configuration.
Update SSH Host Updates an existing connection to an SSH host.
Running the SSH Plug-In Sample Workflows
You can run the SSH plug-in sample workflows from the Orchestrator client to test the connection
between the Orchestrator server and the SSH host.
n
Generate a Key Pair
You can run a workflow from the Orchestrator client to generate a key pair. You can use the key pair
to connect to an SSH host without a password.
n
Change the Key Pair Passphrase
You can run a workflow from the Orchestrator client to change the passphrase for the key pair that
you generated most recently.
n
Register an Orchestrator Public Key on an SSH Host
You can use a public key instead of a password. To register an Orchestrator public key on an SSH
host, you can run a workflow from the Orchestrator client.
n
Run an SSH Command
You can run a workflow from the Orchestrator client to run SSH commands on a remote SSH server.
n
Copy a File from an SSH Host
You can run a workflow on the Orchestrator client to copy files from an SSH host to the Orchestrator
server.
n
Copy a File to an SSH Host
You can run a workflow from the Orchestrator client to copy files from the Orchestrator server to an
SSH host.
VMware, Inc. 89
Using VMware vRealize Orchestrator Plug-Ins
Generate a Key Pair
You can run a workflow from the Orchestrator client to generate a key pair. You can use the key pair to
connect to an SSH host without a password.
A key pair consists of a public key and a private key. Orchestrator can use the private key to connect to
the public key on an SSH host. You can use a passphrase to improve security.
Caution All Orchestrator users with the right set of privileges can read, use, and overwrite your private
key.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SSH and navigate to the Generate key pair
workflow.
3 Right-click the Generate key pair workflow and select Start workflow.
4 Provide the required information.
a Select the key type.
b Select the key size.
c (Optional) Enter a passphrase.
Note You can change the passphrase later.
d (Optional) Enter a comment.
5 Click Submit to run the workflow.
If a key pair exists, the new key pair overwrites it.
Change the Key Pair Passphrase
You can run a workflow from the Orchestrator client to change the passphrase for the key pair that you
generated most recently.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
VMware, Inc. 90
Using VMware vRealize Orchestrator Plug-Ins
2 In the workflows hierarchical list, expand Library > SSH and navigate to the Change key pair
passphrase workflow.
3 Right-click the Change key pair passphrase workflow and select Start workflow.
4 Reset the key pair passphrase.
a Enter the current passphrase.
b Enter the new passphrase.
5 Click Submit to run the workflow.
Register an Orchestrator Public Key on an SSH Host
You can use a public key instead of a password. To register an Orchestrator public key on an SSH host,
you can run a workflow from the Orchestrator client.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SSH and navigate to the Register vCO public key
on host workflow.
3 Right-click the Register vCO public key on host workflow and select Start workflow.
4 Provide the name of the SSH host, and the user name and password to log in to this host.
Note You must provide credentials that are registered on the SSH host.
5 Click Submit to run the workflow.
You can use public key authentication instead of password authentication when you connect to the SSH
host as the registered user.
Run an SSH Command
You can run a workflow from the Orchestrator client to run SSH commands on a remote SSH server.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SSH and navigate to the Run SSH command
workflow.
VMware, Inc. 91
Using VMware vRealize Orchestrator Plug-Ins
3 Right-click the Run SSH command workflow and select Start workflow.
4 Enter an SSH host name or IP address, and click Next.
5 Enter an SSH command to run, and click Next.
Note The default SSH command is uptime . It shows how long the server has been active and the
user load for that period.
6 Select Yes to use password authentication, and click Next.
Note The default option is to use key file authentication.
7 Enter a user name, and click Next.
8 Enter a password if the authentication method requires a password. Otherwise, enter the path to the
private key and enter the passphrase for the private key.
9 Click Submit to run the workflow.
Copy a File from an SSH Host
You can run a workflow on the Orchestrator client to copy files from an SSH host to the Orchestrator
server.
The SSH plug-in uses the Java JCraft library, which implements SFTP. The SCP get command workflow
transfers files by using SFTP.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Note Orchestrator must have explicit write permissions in order to write in folders.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SSH and navigate to the SCP get command
workflow.
3 Right-click the SCP get command workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type an SSH host name or IP address.
b Type the SSH authentication information.
5 Type the file information.
a Type the path to the directory on the Orchestrator server into which to copy the file.
b Type the path to the file to get from the remote SSH host.
6 Click Submit to run the workflow.
VMware, Inc. 92
Using VMware vRealize Orchestrator Plug-Ins
Copy a File to an SSH Host
You can run a workflow from the Orchestrator client to copy files from the Orchestrator server to an SSH
host.
The SSH plug-in uses the Java JCraft library, which implements SFTP. The SCP put command workflow
transfers files by using SFTP.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run SSH workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, expand Library > SSH and navigate to the SCP put command
workflow.
3 Right-click the SCP put command workflow and select Start workflow.
4 Provide the required information, and click Next.
a Type an SSH host name or IP address.
b Type the SSH authentication information.
5 Enter the file information.
a Enter the path to the file that you want to copy from the local Orchestrator server to the remote
SSH host.
b Enter the path to the directory on the remote SSH host into which to copy the file.
6 Click Submit to run the workflow.
VMware, Inc. 93
Using the XML Plug-In 9
You can use the XML plug-in to run workflows that create and modify XML documents.
The XML plug-in adds an implementation of a Document Object Model (DOM) XML parser to the
Orchestrator JavaScript API. The XML plug-in also provides some sample workflows to demonstrate how
you can create and modify XML documents from workflows.
Alternatively, you can use the ECMAScript for XML (E4X) implementation in the Orchestrator JavaScript
API to process XML documents directly in JavaScript. For an E4X scripting example, see Developing with
VMware vRealize Orchestrator .
For information about E4X, go to the Web site of the organization that maintains the ECMA-357 standard.
Running the XML Plug-In Sample Workflows
You can run the XML plug-in sample workflows from the Orchestrator client to create and modify XML
documents for testing purposes.
Because the workflows can create, read, or modify files, you must have sufficient access rights to the
working directory.
Orchestrator has read, write, and execute rights to a folder named orchestrator , at the root of the
server system. Although workflows have permission to read, write, and execute in this folder, you must
create the folder on the server system. If you use the Orchestrator Appliance, the folder is named vco and
is located at /var/run/vco .
You can allow access to other folders by changing the settings for server file system access from
workflows and JavaScript. See Installing and Configuring VMware vRealize Orchestrator, Setting Server
File System Access from Workflows and Actions .
n
Create a Simple XML Document
You can run a workflow from the Orchestrator client to create a simple XML document for testing
purposes.
n
Find an Element in an XML Document
You can run a workflow from the Orchestrator client to find an element in the XML created by the
Create a simple XML document workflow.
VMware, Inc.
94
Using VMware vRealize Orchestrator Plug-Ins
n
Modify an XML Document
You can run a workflow from the Orchestrator client to modify the XML that the Create a simple XML
document workflow creates.
n
Create an Example Address Book from XML
You can run a workflow from the Orchestrator client to create an address book for testing purposes.
Create a Simple XML Document
You can run a workflow from the Orchestrator client to create a simple XML document for testing
purposes.
Prerequisites
n
Verify that the user account you are logged in with has the necessary permissions to run XML
workflows.
n
Verify that you created the c:/orchestrator folder at the root of the Orchestrator server system or
set access rights to another folder.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, open Library > XML > Samples XML (Simple) to navigate to the
Create a simple XML document workflow.
3 Right-click the Create a simple XML document workflow and select Start workflow.
4 Type the filepath to the XML document to create.
For example, c:/orchestrator/filename .xml .
5 Click Submit to run the workflow.
The workflow creates an XML document that contains a list of users. The attributes for each entry are
user ID and name .
Find an Element in an XML Document
You can run a workflow from the Orchestrator client to find an element in the XML created by the Create a
simple XML document workflow.
Prerequisites
n
Verify that the user account you are logged in with has the necessary permissions to run XML
workflows.
n
Verify that you created the c:/orchestrator folder at the root of the Orchestrator server system or
set access rights to another folder.
VMware, Inc. 95
Using VMware vRealize Orchestrator Plug-Ins
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, open Library > XML > Samples XML (Simple) to navigate to the
Find element in document workflow.
3 Right-click the Find element in document workflow and select Start workflow.
4 Type the filepath to the XML document.
For example, c:/orchestrator/filename .xml .
5 Click Submit to run the workflow.
The workflow searches for an element and displays the result in the system log.
What to do next
To view the result, select the completed workflow run in the Orchestrator client and click Logs on the
Schema tab.
Modify an XML Document
You can run a workflow from the Orchestrator client to modify the XML that the Create a simple XML
document workflow creates.
Prerequisites
n
Verify that the user account you are logged in with has the necessary permissions to run XML
workflows.
n
Verify that you created the c:/orchestrator folder at the root of the Orchestrator server system or
set access rights to another folder.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, open Library > XML > Samples XML (Simple) to navigate to the
Modify XML document workflow.
3 Right-click the Modify XML document workflow and select Start workflow.
VMware, Inc. 96
Using VMware vRealize Orchestrator Plug-Ins
4 Provide the input and output filepaths.
a Type the filepath to the XML document to modify.
For example, c:/orchestrator/filename .xml .
b Type the filepath to the modified XML document.
For example, c:/orchestrator/filename .xml .
Note If you type the same filepath in both fields, the workflow overwrites the original file with the
modified file. If you type an output filepath to a file that does not exist, the workflow creates a modified
file.
5 Click Submit to run the workflow.
The workflow searches for an element and modifies the entry where the element is found.
Create an Example Address Book from XML
You can run a workflow from the Orchestrator client to create an address book for testing purposes.
Prerequisites
n
Verify that the user account you are logged in with has the necessary permissions to run XML
workflows.
n
Verify that you created the c:/orchestrator folder at the root of the Orchestrator server system or
set access rights to another folder.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 In the workflows hierarchical list, open Library > XML > Samples XML (Address Book) to navigate
to the Full address book test workflow.
3 Right-click the Full address book test workflow and select Start workflow.
4 Type the path to the address book folder.
For example, c:/orchestrator/foldername .
The workflow automatically creates the folder if it does not exist.
5 Click Submit to run the workflow.
The workflow creates a DTD, an XML, and a CSS file, appends the stylesheet, and stores the files in the
specified folder.
VMware, Inc. 97
Access the Mail Plug-In Sample
Workflows 10
You can access the Mail plug-in sample workflows through the Orchestrator client.
Prerequisites
Verify that the user account you are logged in with has the necessary permissions to run Mail workflows.
Procedure
1 Click the Workflows view in the Orchestrator client.
2 Expand the hierarchical list to Library > Mail.
What to do next
Review and run the sample workflows.
VMware, Inc.
98
Add a Database 11
You can run a workflow to add a database to the Orchestrator server and configure the host connection
parameters.
When you add a database that requires a secure connection, you must import the database SSL
certificate. You can import the SSL certificate under the Trusted Certificates tab in Control Center.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Click the Workflows view in the Orchestrator client.
3 In the workflows hierarchical list, expand Library > SQL > Configuration and navigate to the Add a
database workflow.
4 Right-click the Add a database workflow and select Start workflow.
5 In the Name text box, type the name of the database.
6 Select the type of the database.
7 In the Connection URL text box, type the address of the database.
Database Type Syntax
Oracle
Microsoft SQL (with SQL
authentication)
Microsoft SQL (with Windows account
authentication)
PostgreSQL
MySQL
VMware, Inc.
jdbc:oracle:thin:@database_url:port_number :SID
jdbc:jtds:sqlserver://database_url:port_number /database_name
jdbc:jtds:sqlserver://database_url:port_number /database_name ;useN
TLMv2=true ;domain=domain_name
jdbc:postgresql://database_url:port_number /database_name
jdbc:mysql://database_url:port_number /database_name
99
Using VMware vRealize Orchestrator Plug-Ins
8 Select the session mode that the plug-in uses to connect to the database.
Option Description
Shared Session The plug-in uses shared credentials to connect to the database. You must provide
the database credentials for the shared session.
Session Per User The Orchestrator client retrieves credentials from the user who is logged in.
Note To use session per user mode, you must authenticate by using a user
name only. You should not use domain\user or user@domain for authentication.
9 Click Submit to run the workflow.
After the workflow runs successfully, the database and all tables that belong to it appear in the Inventory
view.
VMware, Inc. 100