Automating Tintri with vRO Part 3: Get UUID from VMware Virtual Machine

In this section I’m going to walk through utilizing the workflow I created to get the Tintri UUID from a VMware Virtual Machine.

Why do I need this workflow?

In order for us to be able to perform any actions against VMs from the Tintri perspective, we need to know the UUID of the VM. This workflow allows us to get it.

Pre Requisites:

1. Completed Part 2 verifying that you can create a session to your Tintri VM Store and are able to return a JSESSION ID.
2. Have a Virtual Machine in vCenter which is running on the Tintri VM Store you tested in Part 2.
3. Import the latest Tintri Workflow Package I created and uploaded to FlowGrab.

What is the Tintri UUID?

The Tintri UUID is the unique object identifier for which we need to reference when performing any Tintri operations against the Virtual Machine. This is how Tintri sees the virtual machine as opposed to VMware which uses the Managed Object Reference for the vCenter object.

For example, in VMware we have this VM:

demovm

If we look in vRealize Orchestrator, you can see that the Managed object reference for this VM is:

demovmvRO

In Tintri we have the same VM

demovmTintri

If we take it a step further and look at the Tintri API in your browser, you will see that Tintri has both values for the VM. The VM MOR, and the Tintri UUID. Our goal here is to get the Tintri UUID, so we can perform REST operations against it, like Snapshot, Replication, and Sync VM which are in the next set of posts.

tintriuuid

Step 1: Import the package you downloaded from FlowGrab

Once imported you should see some additional vRO workflows, and Actions.

newworkflows

Step 2: Take a peak inside the workflows

If you look in the workflow for Tintri-Session and Get UUID you will notice that this workflow includes the workflow from Part 2a for Creating the session as well as the other workflow we just imported.

sessionuuidworkflow

We first run the Create Session workflow, store the JSESSIONID as a general attribute, and then run the GetUUID fromVM workflow using the JSESSIONID we stored from the previous workflow.

visualbinding1

 

visualbinding2

Step 3: Run the workflow

Run the workflow and select a Virtual Machine.

runworkflow1

Check the logs and make a note of the MOR and UUID.

workflowrunlogs

Take a look in vRO at the VM from the inventory view and should see the Managed object reference matches the VM you selected.

Take a look in the Tintri API from your browser, and do a search for the MOR. You should see the matching Tintri UUID there as well.

What now…

Now we are able to successfully get the UUID, we can start to perform Tintri actions upon the VM using vRO. In the next part of the series we will be going through executing a Tintri Snapshot on the VM.

Part 4: vRO workflow: Tintri Snapshot a Virtual Machine – coming Tuesday May 26.

 

Leave a Reply

Your email address will not be published. Required fields are marked *