Using Pure1 Meta for Intelligent Datastore Selection and VM Provisioning
When it comes to monitoring your Pure Storage environment Pure1 is a great place for that. It is also a great place to use your analytic’s data to your advantage and use it for intelligent VMware provisioning! In this blog post I will cover how to use this data to your advantage to make sure you can easily deploy VM’s to the most optimal array and datastore.
If you have used the Pure Storage vSphere Plugin after version 4.2.0, it includes Intelligent VMFS Provisioning. What does that mean? Utilizing Pure1 there is a concept of Load which reviews creates a metric based on Performance. It will also look at capacity and make a recommendation on what is the Recommended array to provision the datastore to.
A question came up on a call as I demoed this, and the ask was can this be used for VM placement? Currently Storage DRS was being used and works great for a single array, but they wanted to be able to intelligently provision a VM to the most optimal array and datastore. The Pure Storage vRealize Orchestrator Plugin already had a workflow for Select Optimal VMFS Datastore via Pure1 but it was missing the ability to provision a VM. This blog post will cover how to use Pure1 Meta to select an optimal datastore for provisioning a VM using both vRO and PowerCLI.
Using vRealize Orchestrator (vRO)
Using the built-in workflows for vRO Management Pack we can start looking at the Select Optimal VMFS Datastore via Pure1 workflow. This workflow will take in a Compute Cluster, Datastore Cluster or Manual Selection and interate thriough the datastores looking at the array Busy Meter and then Pick a recommended target array. From there it will select an optimal datastore based on capacity.
The output variable is then a Datastore object.
Finally, creating a new workflow we can link together the Select Optimal VMFS Datastore via Pure1 and the Clone Virtual Machine workflows together using the output from the first and taking it in as an input into the second.
This is just an example of a basic workflow to show how this can be accomplished, vRO is a very powerful tool that can expand on how this can be customized even further.
Using PowerCLI I thought would also be a great use case, many folks I talk to have more Powershell driven workflows then vRO. Pure Storage currently do not have any out of the box cmdlet’s to do this, but I hope my progress will help make them into the official Pure Storage VMware Module.
The Script/Module contains a few different functions that duplicate the efforts of the vRO Workflow.
- Get-P1Datastores - This will Collect the datastores mapped to the cluster object and pull the arrays they are connected to through Pure1
- Get-P1Load - This will collect the Load percent from Pure1 for the Arrays passed.
- Get-P1LeastLoadArray - This will pull the array that has the Least Load for the Arrays passed.
- Get-P1LeastLoadArrayDS - This will pull a list of the datastores on the Array with the least load.
- Get-P1DSFreeSpace - This will pull the datastore with the least free space from the list of the datastores on the Array with the least load.
- Deploy-P1VM - This will clone a VM using the datastore with the most free space on the array with the least load.
Here is a copy of the script on GitHub.
Here is an example output of the script that shows how results are printed out to the screen during the running of the script/module.
Again, just like the vRO workflow this is not perfect. It will b ase things off of the P1Load Window, it also does not currently work with ActiveCluster or ActiveDR based datastores.
However, my goal was to create this as an example of what can be accomplished using some of the Pure Storage Tools.
My goal will be to invest more time making this part of the official PureStorage.FlashArray.VMware module so look forward to seeing that in the future!
Adding in Pure1 Meta integration can open up a world of additional workflows for your VMware environment. Not only can it now be used to select an optimal array for your datastore/volume creation but now you can use it for workload provisioning as well!
Questions or Comments? Leave them below!comments powered by Disqus
- Patching the vCenter Server Appliance (VCSA) using the REST API - Part 2 (PowerCLI Module)
- Using the VMware Event Broker Appliance to Automatically Expand a Pure Storage FlashArray Datastore
- Configuring vRealize Orchestrator to use Pure1 Integration
- Unable to Provision a vVol Hard Disk on a VM Located on VMFS Datastore
- Installing and Updating the Pure Storage vSphere Plugin