Getting Started with vRealize Orchestrator and VVols

Over the past few weeks, I have been working on writing a vRealize Orchestrator workflow package for Virtual Volumes and the FlashArray. While that is not quite ready to go out, I think some basics for starting to use vRO and VVols are worth noting.

There are three main parts of using VVols with vRO:

  1. Core vCenter SDK–this is what you use to create VMs, datastores, etc.
  2. SMS–this is the service that manages storage providers (VASA) and replication for VVols.
  3. PBM–this is the service that you use for storage policy based features.

vCenter Management SDK

Not gonna spend much time here for this post as it is generally well understood. This is where you can manage your VM objects (VMs, hosts, datastores, vSwitches, etc. etc.).

You can mount things like VVol datastores. Note this is a separate API call from VMFS mounting. For instance, under the host object (hostSystem) you can use the configManager and datastoreSystem to run createVmfsDatastore().  This takes in VmfsDatastoreCreateSpec which designates the underlying disk.

VVol datastores are different, because they are not disks, nor need formatting. What underlies a VVol datastore is a storage container. More on VVol datastores here.  To mount this, you can use the same datastoreSystem and instead invoke createVmfsDatastore() which takes in VcHostDatastoreSystemVvolDatastoreSpec which just has the storage container ID and a name. Much simpler input to build than VMFS.

Other than that, a lot of the VVol and Storage Policy Based Management stuff is done with the PBM service or the SMS service.

SMS Service

This the service in which you can do most of the VASA and VVol type configuration. First off, how do you even call it?

Well in case you are curious the ManagementObjectBrowser (MoB) is a different URL then the standard vCenter one. You can get to it via:

https://<vCenter IP or FQDN>sms/mob

I know a lot of people (myself included) like to use the MoB to peruse through some of the API operations.

To access the methods offered by the SMS service instance (storage manager), you can get to it from the vCenter object (referred to as a sdkConnection) through the smsStorageManager

var storageService = mySDKconnection.storageManagement;
var smsManager = storageService.smsStorageManager;

From this object you can call all sorts of methods.

So this is where you would register the VASA provider(s) with register_provider_Task();

Or if you want to get all available storage containers:

var storageService = mySDKconnection.storageManagement;
var smsManager = storageService.smsStorageManager;
var response = smsManager.queryStorageContainer(null);

And so on. The next step in this journey is running things against a VASA provider. You can query for all providers and get the one you want. queryProvider() returns all instances of registered providers in that vCenter in an array of SmsProvider objects. There could be many providers (not just the storage providers) so look for instances of vasaProvider. This is where you can run methods off specific to that provider.

Things of note are queryProviderInfo() which returns all types of information in VasaProviderInfo. Information like related storage arrays etc.

From the VASA provider you can also kick off test failover, full failover, replication synchronization and more. All of this SRM-like functionality is BUILT-IN to VVols and VASA 3.0. Very cool and makes scripting much easier (vRO or PowerCLI or otherwise) with VVols.

PBM Service

The PBM service, is responsible for policy stuff. Once again, it has it’s own MoB:

https://<vCenter IP or FQDN>/pbm/mob

In vRO it can be accessed from the SDK connection too:

var storageService = sdkConnection.storageManagement;

Under the storage service, there are a few managers for PBM:

The main ones are the pbmPlacementSolver (figure out what storage is compatible with a storage policy for instance), pbmProfileManager (create, delete, read, list storage policies) and pbmComplianceManager (check VM or storage compliance etc.).

Through these instances, you can do A LOT. Pretty cool and somewhat fairly straight forward API that is decently well explained in the vRO API helper.

The good news for those people who aren’t scripters–I will be releasing a vRO workflow package very soon that I am finishing up now for FlashArray customers that will automate the vast majority of VVol and Storage Policy tasks.

Here is a sneak peak video of running a VVol Test Failover with vRealize Orchestrator and the workflow I wrote.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.