Life Cycle Extensibility vRealize Automation 7.
Life Cycle Extensibility 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–2018 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc.
Contents Life Cycle Extensibility 7 1 Machine Extensibility Overview 8 Machine Life Cycle Extensibility 8 Choosing a Life Cycle Extensibility Scenario 9 2 Extending Machine Lifecycles By Using vRealize Orchestrator 11 Extending Machine Lifecycles by Using vRealize Orchestrator Checklist Installing the vRealize Automation Plug-In 11 12 vCenter Orchestrator Integration Prerequisites 12 vRealize Automation Plug-In Functional Prerequisites 13 Install the vRealize Automation Plug-In On an External v
Life Cycle Extensibility Scenario: Send Software Requests to an External System for Approval Troubleshooting Workflow Subscriptions 48 52 Troubleshooting vRealize Orchestrator Workflows That Do Not Start Troubleshooting Provisioning Requests That Take Too Much Time 52 53 Troubleshooting a vRealize Orchestrator Workflow That Does Not Run for an Approval Request 53 Troubleshooting a Rejected Approval Request That Should Be Approved Troubleshooting a Rejected Approval Request 54 54 4 Extending Machi
Life Cycle Extensibility Operation Commands 85 Operation-Create 85 Operation-Delete 86 Operation-List Skill Commands 86 Skill-Install Skill-List 86 86 87 Skill-Uninstall 87 Workflow Commands 88 Workflow-Add-Skills 88 Workflow-List 88 Workflow-Remove-Skills Workflow-Rollback Workflow-Update Import Commands 89 89 90 90 Machine-BulkRegisterExport 90 Machine-BulkRegisterImport 91 7 vRealize Automation Workflow Activity Reference 93 DynamicOps.Repository.
Life Cycle Extensibility LogMessage 101 RunProcess 102 SendEmail 102 SetMachineProperty SetWorkflowResult VMware, Inc.
Life Cycle Extensibility Life Cycle Extensibility provides information about customizing IaaS workflows by using vRealize Orchestrator as well as vRealize Automation Designer and its associated command-line tools. It covers the following subjects: n Customizing IaaS machine state change workflows, including calling vRealize Orchestrator workflows from IaaS by using vRealize Orchestrator or vRealize Automation Designer. n Installing and configuring the vRealize Automation plug-in.
Machine Extensibility Overview 1 Provisioning or decommissioning a new machine, especially for mission-critical systems, typically requires interacting with a number of different management systems, including DNS servers, load balancers, CMDBs, IP Address Management and other systems.
Life Cycle Extensibility Figure 1‑1. Master workflow states for provisioning machines Figure 1‑2. Master workflow states for importing machines Figure 1‑3. Master workflow states for machine lease expiration Figure 1‑4. Master workflow states for disposing a machine Table 1‑1. Customizable State Change Workflows Master Workflow State Customizable Workflow Name Extensibility Examples BuildingMachine WFStubBuildingMachine Prepare for the machine to be created on the hypervisor.
Life Cycle Extensibility You can extend machine lifecycles by using vRealize Automation Designer to call out to vRealize Orchestrator, or by using vRealize Orchestrator directly. Both approaches allow you to inject custom logic into predetermined stages of the IaaS machine lifecycle by creating custom vRealize Orchestrator workflows and then insert the custom workflows into the state change workflow stubs.
Extending Machine Lifecycles By Using vRealize Orchestrator 2 You can inject custom logic into predetermined stages of the IaaS machine lifecycle by creating custom vRealize Orchestrator workflows and then using vRealize Orchestrator to insert the custom workflows into the lifecycle of machines built from specific blueprints.
Life Cycle Extensibility Table 2‑1. Extending Machine Lifecycles by Using vRealize Orchestrator Checklist (Continued) Task Details Create a vRealize Automation endpoint for your vRealize Orchestrator instance. Create a vRealize Orchestrator Endpoint Use the workflow template provided in the Extensibility subdirectory of the vRealize Automation plugin library to create a custom vRealize Orchestrator workflow to run during the machine lifecycle.
Life Cycle Extensibility vRealize Automation Plug-In Functional Prerequisites To install and use the vRealize Automation plug-in, your system must meet certain functional prerequisites. vRealize Automation You must have access to a vRealize Automation server. Version 7.0 of the plug-in works with vRealize Automation 7.0. For information about setting up vRealize Automation, see vRealize Automation Installing vRealize Automation 7.0. vRealize Orchestrator Server Version 7.
Life Cycle Extensibility Configuring the vRealize Automation Plug-in for Machine Extensibility You configure your vRealize Automation and IaaS hosts, install the customizations for machine extensibility, and create a vRealize Automation endpoint for your vRealize Orchestrator instance. Add a vRealize Automation Host You can run a workflow to 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.
Life Cycle Extensibility 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 Select Library > vRealize Automation > Infrastructure Administration > Configuration. 4 Right-click Add an IaaS host and select Start workflow.
Life Cycle Extensibility 18 Click Submit. Install vRealize Orchestrator Customization You can run a workflow to install the customized state change workflow stubs and Orchestrator menu operation workflows. Note The workflow stubs are being replaced by the event broker workflow subscriptions. They are still available, supported, and they can be used, but expect them to be removed in a future version of vRealize Automation.
Life Cycle Extensibility 3 Enter a name and, optionally, a description. 4 Type a URL with the fully qualified name or IP address of the vRealize Orchestrator server and the vRealize Orchestrator port number. The transport protocol must be HTTPS. If no port is specified, the default port 443 is used. To use the default vRealize Orchestrator instance embedded in the vRealize Automation appliance, type https://vrealize-automation-appliance-hostname:443/vco. 5 Specify the endpoint priority.
Life Cycle Extensibility Assign a State Change Workflow to a Blueprint and Its Virtual Machines You configure custom vRealize Orchestrator workflows to run at specific stages in the master machine workflow by associating your custom workflow with a state change workflow stub and assigning the workflows to a blueprint. Note The workflow stubs are being replaced by the event broker workflow subscriptions.
Configuring Workflow Subscriptions to Extend vRealize Automation 3 You create workflow subscriptions that use the event broker service to monitor the registered services for event messages in vRealize Automation, and then run a specified vRealize Orchestrator workflow when the conditions in the subscription are met. To configure the subscription you specify the event topic, the triggering conditions, and the workflow that runs when triggered.
Life Cycle Extensibility Table 3‑1. Event Topics (Continued) Event Topic Name Description Service EventLog Default Event A standard entry is added to the event log. eventlog-service The log entry is not distributed to subscribers. Blueprint Configuration A blueprint is created, updated, or deleted. composition-service Resource Reclamation Completion Event A resource lease expired and the resources are reclaimed.
Life Cycle Extensibility Table 3‑2. Workflow Subscription and Event Broker Terminology (Continued) Term Description Subscriber Consumes the events published to the event broker service based on the subscription definition. The subscriber might also be referred to as the consumer. Provider Registers event topics in the event broker service. Producer Publishes events to the event broker service.
Life Cycle Extensibility Blocking subscriptions run in priority order. The highest priority value is 0 (zero). If you have more than one blocking subscription for the same event topic with the same priority level, the subscriptions run in alphabetical order based on the name. After all blocking subscriptions are processed, the message is sent to all the nonblocking subscriptions at the same time.
Life Cycle Extensibility Workflow Input Parameters The custom workflow that you create can include all the parameters or a single parameter that consumes all the data in the payload. n To include individual parameters, configure one or more parameters. Ensure that the name and type match the name and type specified in the schema. n To use a single parameter, configure one parameter with a type of Properties. You can provide any useful name. For example, you can use payload as the parameter name.
Life Cycle Extensibility Table 3‑3. Workflow Subscription options (Continued) Option Description Unpublish Return a subscription to a draft state. The subscription is no longer active in your environment and no longer receives events. If you republish a subscription, the subscription starts to receive new events. Past events are not received. Delete n Delete the selected subscription. Workflow Subscription Event Topic Tab Settings Event topics are classes of events provided in vRealize Automation.
Life Cycle Extensibility Table 3‑4. Event Topic Options (Continued) Option Description Replyable Indicates whether an event topic subscription can publish a reply event to the service that originally produced the event. If the value is yes, a reply is sent to the service that published the original event when the workflow finishes. The reply contains the output of the vRealize Orchestrator workflow and any error details. Schema Describes the structure of the event's payload.
Life Cycle Extensibility Table 3‑5. Conditions Tab Options Option Description Run for all events The selected workflow runs when the message for this event topic is received. Run based on conditions The selected workflow runs when the event message is detected and the event meets the configured conditions. If you select this option, you must specify conditions based on the event data to trigger the selected workflow for this subscription.
Life Cycle Extensibility Table 3‑7. Details Tab Options Options Descriptions Name By default, the displayed name is the name of the selected workflow. This name is displayed in the subscription list. The name must be unique in the tenant. Priority The order in which the blocking subscriptions run. Zero is the highest priority. If an event topic has multiple blocking workflow subscriptions with the same priority, the subscriptions are then processed in alphabetical order based on the subscription name.
Life Cycle Extensibility Table 3‑7. Details Tab Options (Continued) Options Descriptions Description By default, the displayed description is the workflow description. Blocking Determines if the workflow can block subsequent workflows for the same event topic from receiving an event message while waiting for a reply. Subscriptions with blocking enabled receive messages before subscriptions that are not configured as blocking for the same event topic, based on priority order.
Life Cycle Extensibility Machine lifecycle. Create workflow subscriptions that run workflows related to management actions that an owning user runs on the provisioned machine. n Configuring vRealize Orchestrator Workflows for Provisioning and Life Cycle Workflows You must configure your vRealize Orchestrator workflows to support the IaaS service message. Provisioning and Life Cycle Event Topic Schema The machine provisioning and machine life cycle event topics use the same life cycle schema.
Life Cycle Extensibility Working with Extensibility Custom Properties The virtual machine custom properties are not included in the event payload unless they are specified as an extensibility custom property for the life cycle state. You can add these properties to IaaS endpoints, reservations, blueprints, requests, and other objects that support custom properties. The format of the custom property that you add to an object is Extensibility.Lifecycle.Properties.{workflowName}.{stateName}.
Life Cycle Extensibility Table 3‑8. LifecycleState Elements Property Description Format and Values Examples state Contains workflow name and state name. {workflowName}.{stateName} n VMPSMasterWorkflow32.Requested n VMPSMasterWorkflow32.MachineActivated n BasicVmWorkflow.BuildComplete n PRE. An event is published when entering this state. n POST. An event is published when exiting this state. n EVENT. An event is published when an phase Contains the phase that triggered a message.
Life Cycle Extensibility The active global states are actions that you can run on provisioned machines. Table 3‑10. Active Events State Events [Triggering String] (Topic) Active n OnExpireLease [Expire] (Active) n OnForceExpire [ForceExpire] (Active) n onReprovision [Reprovision] (Active) n onResetBuildSuccess [ResetBuildSuccess] (Active) In the master workflow, provision events occur during the machine provisioning life cycle. Active events are actions you can run on provisioned machines.
Life Cycle Extensibility Table 3‑11.
Life Cycle Extensibility Example of VMPS Master Workflow The VMPS workflow is the master in which the other provisioning workflows are embedded. This example includes the Basic VM Workflow to illustrate the life cycle of a virtual machine. It does not represent a specific workflow in your environment.
Life Cycle Extensibility Blade Logic Bare Metal State (Topic) Events (Topic) BuildFinished n Pre(Provision) CreatingMachine n Pre(Provision) Opsware Bare Metal State (Topic) Events (Topic) BuildFinished n Pre(Provision) OpswareRegister n n OnOpswareRegister(Provisio Pre(Provision) Cloud Provisioning Workflow State (Topic) Events (Topic) BuildComplete n Pre(Provision) CloudProvisioning n n OnCloudProvisioningTimeout(Provision) Pre(Provision) FailedProvisioning n Pre(Provision) App Se
Life Cycle Extensibility State (Topic) Events (Topic) CreatingMachine n OnCreatingMachineComplete(Provision) n OnCreatingMachineTimeout(Provision) n Pre(Provision) FailedProvisioning n Pre(Provision) Opsware Virtual State (Topic) Events (Topic) AddingDisks n OnAddingDisksComplete(Provision) n OnAddingDisksTimeout(Provision) n OnCreateVMComplete(Provision) n OnCreateVMTimeout(Provision) n OnInitialPowerOnComplete(Provision) n OnInitialPowerOnTimeout(Provision) n OnOpswareRegister(
Life Cycle Extensibility Clone Workflow State (Topic) Events (Topic) BuildComplete n Pre(Provision) CloneMachine n Pre(Provision) CustomizeMachine n Pre(Provision) CustomizeOS EjectCD n Pre(Provision) n OnCloneMachineComplete(Provision) n OnCloneMachineTimeout(Provision) n OnCustomizeMachineComplete(Provision) n OnCustomizeMachineTimeout(Provision) n OnCustomizeOS(Provision) n OnCustomizeOSComplete(Provision) n OnCustomizeOSTimeout(Provision) n OnEjectCDComplete(Provision) n OnE
Life Cycle Extensibility State (Topic) Reboot n Pre(Provision) SetupOS n Pre(Provision) Events (Topic) n OnRebootComplete(Provision) n OnRebootTimeout(Provision) n OnSetupOSComplete(Provision) n OnSetupOSTimeout(Provision) External Provisioning Workflow State (Topic) Events (Topic) AddingDisks n OnAddingDisksComplete(Provision) n OnAddingDisksTimeout(Provision) n OnCreatingMachineComplete(Provision) n OnCreatingMachineTimeout(Provision) n OnEpiRegisterComplete(Provision) n OnIniti
Life Cycle Extensibility Physical Provisioning Workflow State (Topic) Events (Topic) FailedProvisioning n Pre(Provision) FinalizeProvisioning n Pre(Provision) Reboot n Pre(Provision) SetupOS n OnInitializeProvisioningTimeout(Provision) n OnInitialPowerOnTimeout(Provision) Pre(Provision) InstallOS n n Pre(Provision) InitialPowerOn n OnFinalizeProvisioningTimeout(Provision) Pre(Provision) InitializeProvisioning n n Pre(Provision) n OnInstallOSComplete(Provision) n OnInstallOSTimeout(
Life Cycle Extensibility Physical SCCM Provisioning Workflow State (Topic) Events (Topic) CheckHardwareType n Pre(Provision) Complete n OnCompleteProvisioningComplete(Provision) Pre(Provision) n OnCompleteProvisioningTimeout(Provision) FailedProvisioning n OnFailedProvisioningTimeout(Provision) n OnFinalizeProvisioningTimeout(Provision) n OnInitializeProvisioningTimeout(Provision) n OnInitialPowerOnTimeout(Provision) n OnSccmRegistrationTimeout(Provision) n n Pre(Provision) Finalize
Life Cycle Extensibility vApp Clone Workflow State (Topic) Events [Triggering String] (Topic) Global n OnFailProvisioning [FailProvisioning] (Provision) n OnMasterProvisioned [MasterProvisioned] (Provision) n OnCloneMachineComplete(Provision) n OnCloneMachineTimeout(Provision) n OnCustomizeMachineComplete(Provision) n OnCustomizeMachineTimeout(Provision) BuildComplete n Pre(Provision) CloneMachine n Pre(Provision) CustomizeMachine n Pre(Provision) CustomizeOS n OnCustomizeOS(Provisio
Life Cycle Extensibility State (Topic) InstallingOS n Pre(Provision) SccmRegistration n Events (Topic) n OnInstallingOSComplete(Provision) n OnInstallingOSTimeout(Provision) n OnSccmRegistrationTimeout(Provision) Pre(Provision) WIM Image Workflow State (Topic) Events (Topic) AddingDisks n OnAddingDisksComplete(Provision) n OnAddingDisksTimeout(Provision) n OnCreatingMachineComplete(Provision) n OnCreatingMachineTimeout(Provision) n OnEjectingCDComplete(Provision) n OnEjectingCDTimeo
Life Cycle Extensibility The basic format for the keys is similar to the following examples. n For a workflow. Extensibility.{workflow}.Timeout n For events. Extensibility.{workflow}.{state}.EVENT.{event}.Timeout n For states. Extensibility.{workflow}.{state}.(PRE/POST).Timeout Use the following as examples when adding keys to the appSetting section. The timeout value format is D.HH:mm:ss.ms. D is day and ms is milliseconds. Day and milliseconds are optional. Hours, minutes, and seconds are required.
Life Cycle Extensibility n Extensibility.Lifecycle.Error.State.{Workflow}.{State}. The value of the property is the name of the state in which the workflow will forcibly transition to in case of timeout or error. Scenario: Take a Post-Provisioning Snapshot of a Virtual Machine As a tenant administrator, you want your service catalog users to have a post-provisioning snapshot of their virtual machines so that they can revert to the fresh machine rather than requesting a new one.
Life Cycle Extensibility What to do next You create a workflow subscription that runs your Automation Post-Provisioning Snapshot workflow. Scenario: Create a Post-Provisioning Snapshot Workflow Subscription. Scenario: Create a Post-Provisioning Snapshot Workflow Subscription As a tenant administrator, you want to create a snapshot of each virtual machine after it is created. You configure a workflow subscription based on the machine provisioning event topic, and publish it to make it active.
Life Cycle Extensibility 6 On the Workflow tab, browse the Orchestrator tree and select your Automation Post-Provisioning Snapshot workflow. 7 Click Next. 8 On the Details tab, enter the Name and Description. In this scenario, enter Post-Provisioning Virtual Machine Snapshot as the name and Create a snapshot when new virtual machine is provisioned and activated as the description. 9 Click Finish. 10 Select the Post-Provisioning Virtual Machine Snapshot row and click Publish.
Life Cycle Extensibility The approval workflow subscription receives messages from the approval service and compares the messages to the configured criteria for approval subscriptions. When it finds a message that matches the criteria, the selected vRealize Orchestrator workflow starts to run. The published event data is passed to the workflow as input and processed in the method specified in the workflow. The results of the workflow are returned to vRealize Automation and the request is processed.
Life Cycle Extensibility serviceId : STRING, externalClassId : STRING // Identifier of the service which initiated the approval // Identifier of the class to which the source object belongs } } Property names and property values can be the custom properties or system properties that you configure in the approval policy level. These properties are configured in the approval policy to allow the approver to change the values during an approval process.
Life Cycle Extensibility Procedure 1 Scenario: Create a vRealize Orchestrator Workflow for Approval Workflow Subscriptions You create a vRealize Orchestrator workflow that accepts the required approval input parameters from vRealize Automation and returns the necessary output parameters to complete the approval process.
Life Cycle Extensibility 4 Save the workflow. What to do next You create an approval policy that uses the workflow subscription as an approver. Scenario: Create an Approval Policy for External Approval Scenario: Create an Approval Policy for External Approval As a tenant administrator, you create an approval policy that generates an event message that is published by the approval service.
Life Cycle Extensibility What to do next n Create a pre-approval workflow subscription that receives event messages based on the configured approval level. See Scenario: Create a Pre-Approval Workflow Subscription. n Apply the approval policy to a software component in an entitlement. See Entitle Users to Services, Catalog Items, and Actions.
Life Cycle Extensibility 9 In the Timeout (min) text box, enter 120. The amount of time you specify until the subscription workflow times out depends on the target system. If vRealize Automation does not process a reply from the target system in the specified number of minutes, the request is automatically rejected. If you do not provide a value, the default timeout is 24 hours. 10 Click Finish. 11 Select the Software External row and click Publish.
Life Cycle Extensibility Solution 1 Verify that you published the workflow subscription. 2 Verify that the workflow subscription conditions are configured correctly. 3 Verify that the vRealize Orchestrator server has the specified workflow. Troubleshooting Provisioning Requests That Take Too Much Time An IaaS machine take ten or more hours to provision.
Life Cycle Extensibility Solution 1 Verify that the approval policy is active and that you selected Use event subscription for an approval level in the policy. 2 Verify that the approval policy is correctly applied in your entitlement. 3 Verify that your workflow subscription is correctly configured and published. 4 Review the event logs for messages related to approvals.
Life Cycle Extensibility 2 Review the logs for messages related to approvals. VMware, Inc.
Extending Machine Life Cycles By Using vRealize Automation Designer 4 You can inject custom logic into predetermined stages of the IaaS machine life cycle by using vRealize Automation Designer to directly edit the state change workflow stubs and, optionally, call out to custom vRealize Orchestrator workflows. Note The workflow stubs are being replaced by the event broker workflow subscriptions.
Life Cycle Extensibility Table 4‑1. Extending Machine Lifecycles By Using vRealize Automation Designer Checklist (Continued) Task Details Using vRealize Automation Designer activities, customize an IaaS Workflow stub. Customize an IaaS Workflow Note The workflow stubs are being replaced by the event broker workflow subscriptions. They are still available, supported, and they can be used, but expect them to be removed in a future version of vRealize Automation.
Life Cycle Extensibility n The vRealize Automation Designer host must have network access to the IaaS Website components (specifically, the Model Manager Web component). n If the Model Manager is installed remotely, the certificate used for the Model Manager Web component must be trusted on the vRealize Automation Designer host. Download the vRealize Automation Designer Installer You can download the vRealize Automation Designer installer from the vRealize Automation appliance.
Life Cycle Extensibility 7 Specify the Model Manager service user credentials. 8 Click Next. The installer validates the combination of Model Manager host and credentials by attempting to access to the Model Manager. If an error is returned, you must provide the correct combination of Model Manager host and credentials before proceeding. 9 Click Install. 10 Click Finish.
Life Cycle Extensibility When executing vRealize Orchestrator workflows, vRealize Automation tries the highest priority vRealize Orchestrator endpoint first. If that endpoint is not reachable, then it proceeds to try the next highest priority endpoint until a vRealize Orchestrator server is available to run the workflow. Prerequisites n Log in to the vRealize Automation console as an IaaS administrator. n Store User Credentials. Procedure 1 Select Infrastructure > Endpoints > Endpoints.
Life Cycle Extensibility 2 Create a new blueprint or edit an existing blueprint. If you are editing an existing blueprint, the vRealize Orchestrator endpoint you specify only applies to new machines provisioned from the updated blueprint. Existing machines provisioned from the blueprint continue to use the highest priority endpoint unless you manually add this property to the machine. 3 Click the Properties tab. a Click New Property. b Type VMware.VCenterOrchestrator.
Life Cycle Extensibility The Toolbox pane on the left provides access to the vRealize Automation workflow activity library. You can drag activities from the toolbox onto the Designer pane to add them to a workflow. The Properties pane displays the configurable properties of the currently selected activity on the Designer pane. This interface is very similar to the workflow designer in Visual Studio.
Life Cycle Extensibility The Imports tab displays imported namespaces from which you can select entity types to add to the workflow. The collapsible Information pane at the bottom of the console displays any errors in configuring activities and provides access to the XAML representation of the workflow. IaaS Workflow Types You can customize two types of workflows by using vRealize Automation Designer: state change workflows and menu operation workflows.
Life Cycle Extensibility vRealize Automation Designer provides a customizable workflow for each of these states. Table 4‑2.
Life Cycle Extensibility In addition to the workflow definition, a menu operation workflow depends on an operation configuration file, which defines the aspects of the custom menu option such as the display text, which roles have access to it, and the machine states for which the operation is available. Note An XaaS architect can define custom actions for any catalog item by using the XaaS.
Life Cycle Extensibility 2 3 Select the workflow that you want to customize.
Life Cycle Extensibility Synchronous Execution The InvokeVcoWorkflow activity calls a vRealize Orchestrator workflow and blocks further execution of its parent IaaS workflow until the vRealize Orchestrator workflow completes. The activity returns the output parameters for the vRealize Orchestrator workflow. In addition, the synchronous execution supports the following property: n WorkflowTimeout is a timeout value in seconds.
Life Cycle Extensibility 2 Drag the InvokeVcoWorkflow or the InvokeVcoWorkflowAsync activity into the Designer pane. 3 Select the vCenter Orchestrator workflow to execute. a Under General, click the ellipsis next to Workflow. b In the Browse for vCO workflow dialog box, select a workflow. c Click OK. The Inputs and Outputs sections display the input and output parameters of the selected workflow. 4 In the Properties pane, specify one of the following target parameters.
Life Cycle Extensibility Prerequisites Call a vRealize Orchestrator Workflow using the InvokeVcoWorkflowAsync activity. Procedure 1 In vRealize Automation Designer, open a workflow where you have used the InvokeVcoWorkflowAsync activity. 2 Navigate to the context where you want to check the status of the vRealize Orchestrator workflow. 3 Drag the GetVcoWorkflowExecutionStatus activity into the Designer pane.
Life Cycle Extensibility 3 Drag the WaitForVcoWorkflowCompletion activity into the Designer pane. 4 In the Properties pane, specify the name of the variable representing the virtual machine ID in VirtualMachineId. The customizable workflows contain a variable by default named virtualMachineId that is set during initialization. 5 Create a variable of type DynamicOps.VcoModel.Common.VcoWorkflowExecutionToken. 6 Create a variable of type DynamicOps.VcoModel.Common.VcoWorkflowExecutionToken.
Life Cycle Extensibility Table 4‑3. vRealize Orchestrator and IaaS Object Types (Continued) vRealize Orchestrator Type IaaS Type Date DateTime VC:VirtualMachine VirtualMachine Note If you are using vRealize Orchestrator 5.1, you must have installed the vRealize Automation integration package to enable the conversion of VC:VirtualMachine object types to VirtualMachine. All other vRealize Orchestrator types are converted to the IaaS type VcoSdkObject.
Life Cycle Extensibility 6 Leave the Value text box blank. The workflow depends on the presence of the property, not on any particular value. 7 Click the Save icon ( 8 Click OK. ). The workflow is now enabled for new machines that are provisioned from this blueprint. Configuring a Menu Operation Workflow After you customize a menu operation workflow, additional configuration is required before it is available to users in the vRealize Automation console.
Life Cycle Extensibility 2 Create the root element customOperations. The element must specify the XML namespace http://www.dynamicops.com/schemas/2009/OperationConfig/. 3 For each operation you want to define, add an operation element within customOperations.
Life Cycle Extensibility 5 (Optional) Specify the machine states for which the operation is available. a Add the machineStates element. b For each state in which the operation should be available, add a state element. On Off The value may be any of the possible machine states.
Life Cycle Extensibility 2 Run the CloudUtil.exe command with the following arguments. n n CloudUtil.exe Operation-Create -c Optionally, you can specify a Model Manager host and request a stack trace in case of error. CloudUtil.
Life Cycle Extensibility Procedure 1 Select Design > Blueprints. 2 Point to the name of a blueprint and click Edit. 3 Click the Actions tab. 4 Select the checkbox that corresponds to the operation that you want to enable. 5 Click OK. The menu operation is now enabled for machines provisioned from this blueprint and available to all user roles specified in the operation configuration file.
Workflows and Distributed Execution Management 5 You can use skills to restrict execution of workflows to specific Distributed Execution Managers. A skill is similar to a tag that you can apply to both workflows and DEM Worker instances. If a workflow is not associated with any skills, any DEM Worker can execute it. If a workflow is associated with one or more skills, then only DEM Workers that are associated with all of the same skills can execute it.
Life Cycle Extensibility 3 Select the name of the skill in the list on the left. 4 Associate the skill with one or more DEM Workers. 5 a Click the Add icon ( b In the Select DEMs dialog, select one or more DEM Worker instances. c Click OK. ) next to Distributed Execution Managers. Associate the skill with one or more Workflows. a Click the Add icon ( b In the Select Workflows dialog, select one or more workflows. c Click OK. ) next to Workflows.
Life Cycle Extensibility 2 In the Manage Skills dialog, select the name of the skill in the list on the left. 3 Select the name of one or more workflows from the Workflows list and click the Remove icon ( 4 Click OK to close the Manage Skills dialog and save your changes to the Model Manager. ). Remove a Skill Removing a skill also removes its associations to any DEM Workers and workflows. Prerequisites Launch the vRealize Automation Designer console.
CloudUtil Command Reference 6 This section provides a reference to the commands in the CloudUtil command line interface. CloudUtil is the command line interface for the vRealize Automation Designer. You run the commands on the Windows machine on which you are running the designer. The default installation location on the Windows machine is C:\Program Files (x86)\VMware\vCAC\Design Center.
Life Cycle Extensibility DEM-Add-Skills Arguments Argument Description -n | - -name Name of a registered Distributed Execution Manager. - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository. Default is specified in the CloudUtil config file in the repositoryAddress key under the section. -s | - -skills Comma-delimited list of skills to associate with this Distributed Execution Manager.
Life Cycle Extensibility Argument Description -s | - -skills Comma-delimited list of skills to remove from this Distributed Execution Manager. -v | - -verbose (Optional) If an error occurs, outputs a stack trace instead of just the exception message. File Commands The File commands enable you to store and manage files (typically scripts) in the Model Manager. File-Export Exports a file from the Model Manager. Synopsis CloudUtil.
Life Cycle Extensibility Argument Description -n | - -name Friendly name to assign to the file in the Model Manager. - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository. Default is specified in the CloudUtil config file in the repositoryAddress key under the section. -v | - -verbose (Optional) If an error occurs, outputs a stack trace instead of just the exception message. File-List Lists all files imported into the Model Manager.
Life Cycle Extensibility File-Remove-Rev Removes a specific revision of a file from the Model Manager. Synopsis CloudUtil.exe File-Remove-Rev -n|--name -r|--revision [-i|--iteration ] [--repository ] [-v|--verbose] File-Export Arguments Argument Description -i | - -iteration (Optional) Version string of the file in the Model Manager. Default is 0.0. -n | - -name Friendly name of the file in the Model Manager.
Life Cycle Extensibility File-Update Updates a previously imported file in the Model Manager with a new revision. Synopsis CloudUtil.exe File-Update -n|--name -f|--filename [-i|--iteration ] [-repository ] [-v|--verbose] File-Update Arguments Argument Description -f | - -filename Path to the updated file. -i | - -iteration (Optional) Version string of the file in the Model Manager. Default is 0.0.
Life Cycle Extensibility Operation-Delete Deletes a custom operation from the Model Manager. Synopsis CloudUtil.exe Operation-Delete -n|--name [--force] [--repository ] [-v|--verbose] Operation-Delete Arguments Argument Description - -force (Optional) Force deletion of the operation. -n | - -name Name of the custom operation in the Model Manager. - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository.
Life Cycle Extensibility Synopsis CloudUtil.exe Skill-Install -n|--name [--repository ] [-v|--verbose] Skill-Install Arguments Argument Description -n | - -name Name for the skill in the Model Manager. - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository. Default is specified in the CloudUtil config file in the repositoryAddress key under the section.
Life Cycle Extensibility Skill-Uninstall Arguments Argument Description -n | - -name Name of the skill to uninstall from the Model Manager. - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository. Default is specified in the CloudUtil config file in the repositoryAddress key under the section. -v | - -verbose (Optional) If an error occurs, outputs a stack trace instead of just the exception message.
Life Cycle Extensibility Table 6‑4. Workflow-List Arguments Argument Description - -repository (Optional) The root URI of the Model Manager, for example, http://hostname/repository. Default is specified in the CloudUtil config file in the repositoryAddress key under the section. -v | - -verbose (Optional) If an error occurs, outputs a stack trace instead of just the exception message. Workflow-Remove-Skills Removes association between skills and a workflow in the Model Manager.
Life Cycle Extensibility Argument Description -r | - -revision Revision of the workflow to revert to. -v | - -verbose (Optional) If an error occurs, outputs a stack trace instead of just the exception message. Workflow-Update Update a customizable workflow with a new revision. CloudUtil.exe Workflow-Update -f|--filename -n|--name [-d|--description ] [--repository ] [-v|--verbose] Table 6‑5.
Life Cycle Extensibility Table 6‑6. (Continued) Argument Description -f | - -filename Specify the name of the CSV data file containing a list of machine names, for example, filename.csv. File is saved in the current path by default. You can also specify the complete path to a preferred directory. -g | - -group (Optional) Specify business group name, for example, Engineering. -i | - -ignore (Optional) Ignore invalid arguments. -m | - -managed (Optional) Export managed virtual machines.
Life Cycle Extensibility Machine-BulkRegisterImport Arguments Table 6‑7. Argument Description -b | - -batch (Optional) Batch size -d | - -delay (Optional) Specify processing delay time in this format: hh:mm:ss, for example, 02:20:10. -f | - -filename Specify the CSV data file name containing the list of machine names. For example, filename.csv. -h | --humanreadable (Optional) Input file contains the virtual machine names and not the GUIDs.
vRealize Automation Workflow Activity Reference 7 VMware provides a library of workflow activities with vRealize Automation Designer for use in customizing workflows. Note The CDK is deprecated beginning with vRealize Automation 7.0. You can use the vRealize Orchestrator workflows to address use cases that you previously addressed with CDK.
Life Cycle Extensibility Table 7‑1. AddLink Activity Input Parameters Argument Type Description DataServiceContext RepositoryServiceContext The DataServiceContext to which to add the link. Source Object The source object for the new link. SourceProperty String The name of the navigation property on the source object that returns the related object. Target Object The object related to the source object by the new link.
Life Cycle Extensibility DeleteLink Changes the state of the link to deleted in the list of links being tracked by the DataServiceContext. Table 7‑6. DeleteLink Activity Input Parameters Argument Type Description DataServiceContext RepositoryServiceContext The DataServiceContext from which to delete the link. Source Object The source object in the link to be marked for deletion.
Life Cycle Extensibility Table 7‑9. LoadProperty Activity Input Parameters Argument Type Description DataServiceContext RepositoryServiceContext The DataServiceContext from which to load the property. Instance Object The entity that contains the property to load. InstanceProperty String The name of the property of the specified entity to load. SaveChanges Saves the changes that the DataServiceContext is tracking to storage. Table 7‑10.
Life Cycle Extensibility DynamicOps.Cdk.Activities The DynamicOps.Cdk.Activities namespace contains advanced activities for IaaS workflows. Note The CDK is deprecated beginning with vRealize Automation 7.0. You can use the vRealize Orchestrator workflows to address use cases that you previously addressed with CDK. ExecutePowerShellScript Executes a PowerShell script stored in the Model Manager under the specified name.
Life Cycle Extensibility Before you use the ExecuteSshScript activity, you must first load the script that you want to execute into the Model Manager using the CloudUtil File-Import command. Table 7‑15. ExecuteSshScript Activity Input Parameters Argument Type Description ScriptName String Name in the Model Manager of the script to execute. Host String Server name against which to execute the script. Username String Username to use in connecting to the host.
Life Cycle Extensibility GetMachineProperties Gets the list of custom properties associated with a machine. Table 7‑21. GetMachineProperties Activity Input Parameters Argument Type Description MachineId Guid The machine whose properties to retrieve. Table 7‑22. GetMachineProperties Activity Output Parameters Argument Type Description Properties Dictionary List of the machine’s properties. Values are returned decrypted if they were stored encrypted.
Life Cycle Extensibility InvokePowerShell Executes a PowerShell command. Table 7‑27. InvokePowerShell Activity Input Parameters Argument Type Description CommandText String Command to execute. Arguments IEnumerable (Optional) Arguments to the command. Input IEnumerable (Optional) The input pipeline. IsScript bool (Optional) Indicates whether CommandText is a script. Default is False. This option is only available in the Properties pane and not in the Designer pane.
Life Cycle Extensibility InvokeSshCommand Executes an SSH command. Table 7‑29. InvokeSshCommand Activity Input Parameters Argument Type Description CommandText String Command to execute. Host String Server name against which to execute the command. Username String Username to use in connecting to the host. Password String Password to use in connecting to the host. Timeout TimeSpan (Optional) Period of time after which execution of the command times out. Default is 30 minutes. Table 7‑30.
Life Cycle Extensibility RunProcess Executes a process on the same machine as the DEM that executes this activity. Note vRealize Automation cannot present the UI from processes launched by the RunProcess activity to the user, therefore these process must be non-interactive. In order to avoid leaving orphaned processes on the DEM machine, the processes must also be self-terminating. Table 7‑33.
Life Cycle Extensibility Table 7‑34. SendEmail Activity Input Parameters (Continued) Argument Type Description EnableSsl bool (Optional) Indicates whether to use SSL. This option is only available in the Properties pane and not in the Designer pane. UserName String The user name with which to authenticate with the SMTP server specified in Host . This option is only available in the Properties pane and not in the Designer pane. Password String The password of the user specified in UserName.