vRealize Automation 7 External Approval Policy with vRealize Orchestrator Workflow

With vRealize Automation 7 an Approval Policy can be linked to an event subscription that in turn can trigger a vRealize Orchestator workflow to perform an external approval process. In this article I describe how to setup the Workflow, the Approval Policy and the Event Subscription.

Workflow as downloadable package

Workflow to use for vRO Cluster Demonstrations

This simple workflow can be used to demonstrate the failover behavior in case of a vRealize Orchestrator node failure. It creates the number of VMs that your specify. I suggest 30. During the execution of the workflow power off one node of the cluster and you will be able to demonstrate that the execution continues on another node.

The workflow is available as a downloadable package:

com.vmwarebits.clustertest.zip

Process a text file from a Resource Element through an Array

This example workflow shows how you can use a ResourceElement containing a list of virtual machine names and execute a workflow for each of the VMs in the list. The workflows and actions are available as a package here: com.vmwarebits.vmlistExample.zip.

To use the workflow yoi create a ResourceElement and import a text file that contains the virtual machine names, such as in the next image.

Preparing SQL Server Express for a vRealize Automation 7 Proof of Concept Setup

For a vRealize Automation 7 deployment including Infrastructure As A Service (IAAS) a Microsoft SQL database server is a requirement. Not everyone has access to that software and when setting up a Proof of Concept environment it is not always justifiable to purchase a SQL Server license. Therefor in the case of a PoC it's a viable solution to use SQL Express.

vRealize (vCAC) and vCenter Orchestrator workflow to change the machine name before building the machine

This workflow allows you to change the machine name for a vRealize Automation Virtual Machine during the build process. It is based on the articles series on the VMware Blog created by Ted Sprinks. (link) That series of three articles is very good, but it might be a bit lengthy if you just need this one single workflow.

Enable tftp service and firewall rules for vCenter 6 Appliance Autodeploy and make them persistent

When using the vCenter 6 appliance as an Autodeploy server you can also use the appliance as your TFTP-server. But for that to work you need to start that service and enable access to it via a firewall rule.

Of course you also need to enable the Autodeploy service itself, which can be done from the vSphere Web Client under Home - Administration - Deployment - System Configuration - Services. 

Tags

Mem.MemMinFreePct calculation example

One of the topics in the VMware vSphere Optimize and Scale course is how the amount of RAM is calculated that your host should have available as a minimum before processes such as ballooning and swapping become active.

The course material provides this table that shows us how this minimal free memory is calculated:

Tags

vCPU and logical CPU sizing with Hyper-Threading explained

When sizing virtual machines you should be aware of the number of physical cores available in your ESXi-host and whether or not it has Hyper-Threading enabled. If you blindly follow the number of vCPU's you can add that VMware presents to you, then you could end up with VM's that offer poor performance. If you want to understand Hyper-Threading and why this is important for sizing please read the articles that I have listed at the bottom of this page.

Tags

vRealize Orchestrator workflow to find a workflow by it's ID

When you have the ID of a workflow then how do you find out what the name of the workflow is and where it's located. To simplify this search I have created this workflow.

You can download the workflow here.

This is the code of the scripting element that is used for the search:

Using the Switch element in vRealize Orchestrator

vRealize Orchestrator (v6) contains a switch element that can be used to evaluate a series of values. In scripting and programming languages the switch construct is also named Case or Do Case.

For example if we want to check the status of a VM and there are three possible values then we would have to use three if statements or three decision elements to check what the status is.

if status = poweredOn 
if status = poweredOff 
if status = suspended 

vRealize Orchestrator workflow with approvals and timeout

This workflow demonstrates an approval process whre two approvers will have the opportunity to approve or deny a request and when both approvers don't respond within the time limit then the workflow will continue as if it was approved. So this will actively give the two approvers a time window to deny a request after which it is automatically approved. Is designed to use n AD group for approver 1 and another AD group for approver 2.

Advanced Service Designer Change My Password Form

In vRealize Automation (formerly know as vCloud Automation Center - vCAC) you can create custom services with forms that allow users to request and work with any type of service. VMware calls this XAAS - Anything as a Service. On request I have created this form that allows a user to change his/her password in Active Directory. The form sets the current logged in user as the user to change the password for and it verifies if the user enters two identical passwords.

Various Orchestrator examples

This package contains several examples that I use in Orchestrator training.

download the package here (version February 2020) 

Import the package from the Packages-tab in the Orchestrator client.

What's in the package?

There are several workflows in this package that demonstrate the functionality of vRealize Orchestrator. Their purpose is to educate, comments are always welcome.

The Case of the Missing Orchestrator Extension (and how it was solved)

After a default installation of vCenter on Windows you automatically have access to vCenter Orchestrator. So when I performed an install it was great that I could start using that tool right away. The only problem I ran into was that the Orchestrator server was not registered as a vCenter Extension, or so it seemed. So I could login with the Orchestrator Client but I could not run workflows from the vSphere Web Client, which is a great feature.

Execute an Orchestrator workflow from a REST client

In this article I explain how to execute a vRealize Orchestrator workflow by invoking a REST method from a REST client. 

Sources used for this article are How to use the REST API to Start a Workflow from vCOteam.info and the Orchestrator REST API documentation that you can find on your own Orchestrator server at this url: https://yourvcoserverFQDN:8281/vco/api/docs/index.html

Orchestrator workflow to register ssh public key on an ESXi host

The SSH plugin for vRealize Orchestrator allows you to execute SSH commands on a host or copy files to a host. This also works well with an ESXi host if SSH is enabled on that host. Unfortunately it only works by default by using a username and password. There also is a workflow to create a key pair and register the vCO server public key on an SSH-host which allows you to run SSH commands without the need of entering a password. But that workflow tries to store the key in a file location that does not exist on the ESXi host.

How to fix a vCenter Appliance No-Networking problem

This problem might occur with your vCenter Server Appliance. But it could also happen with other Linux-servers. It might happen when you move the virtual machine, clone it, restore it, recover it from replication or perform any other action where the MAC Address of the virtual machine changes. This is what you would see on the console of the virtual appliance:

vCenter Appliance No Networking error