Datrium vCenter Orchestrator Snapshot, Clone and Register VM

I have been working with several Datrium customers over the last few weeks on how to integrate the new DVX 4.0 API into vCenter Orchestrator workflows. In this example demo I show how easy it is to use vCenter Orchestrator to build a workflow which will take a VMware virtual machine, initiate a Datrium snapshot then clone that snapshot and present the VM directly to vCenter and give the user the ability to power-on the VM.

There are many use cases where this would be a beneficial workflow.

  • Test and Development
  • Application Deployment testing and verification
  • Testing patches
  • Recovery of items for an application or an end-user
  • Root cause analysis of a failed application

This list is not exhaustive of all possibilities but it does give you an idea of where and when this might be useful.

Datrium DVX API

New within DVX 4.0 is a Python-based SDK (Python 2.7 > or Python 3.3 >) which interacts with Datrium REST-based APIs behind the scenes. The first set of public facing APIs which the engineering team has delivered provides 3 main functions.

  1. Snapshot
  2. Clone
  3. Replicate

The set of functions available will continue to grow, but for a first jaunt into this space I’d agree and say these are the most impactful for a customer. Below is a sample Python script which will connect to the DVX and initiate a snapshot of a VM running on Datrium. The SDK references as well as some sample scripts is available off the Datrium Support site at Support.Datrium.com.

Note: The SDK will be placed into /root/SDK and all of your Python scripts for Datrium DVX should be placed into /root/SDK/Python/.

To get the Datrium DVX API there’s a few quick steps you should follow on your Linux scripting host:

Below is a sample script which uses the Datrium DVX API to initiate a snapshot of a running VM:

VMware vCenter Orchestrator

We can now take our scripts and utilize vCener Orchestrator to be the initiation engine behind the scenes. VMware vCenter Orchestrator is delivered as a virtual appliance which can be grabbed by logging into your my.vmware.com – Item of note here – vCO can be deployed independently or together with VMware vRealize Automation. I found the easiest way to integrate with vCenter SSO to be to deploy the standalone vCO appliance.

In the design view you should create a folder to organize your Workflows – with the new workflow and the vCO connected to vCenter we’re ready to rock! I won’t go into these steps since they’re out of the scope of this particular blog but let me know if you have questions anywhere along the way.

VMware vCenter Orchestrator Scriptable Tasks supports Javascript, for this we’re going to create a Scriptable Task which will call the Linux Python host and execute the necessary actions against Datrium DVX.


Once we head over to the vCO Plug-in in vCenter we can add this Workflow to the right-click context of vCenter and users can exectute directly from vCenter simply by right-clicking on a VM! There’s more complex workflows in the works, but for now happy scripting and I hope this helps!