Guide to PernixData FVP PowerShell Commands

By | February 4, 2014

In the past year PernixData has emerged on the virtual storage scene with their game changing FVP product. FVP utilizes server-side flash drives to create Flash Clusters across a series of vSphere hosts. This works in either Write Through or Write Back Mode. Servers can leverage any SSD in the Flash Cluster to off load writes and achieve a dramatic IOPS improvement.

FVP also comes with a very nice plugin for the vCenter Client. It is easy to use and comes with fantastic metric charts. However, if the GUI is not your style you are in luck, FVP also has a robust PowerShell module. This is a guide on how to use it.

Note: All variable names will be italicized. Please replace with appropriate object.

Installation Steps

The prnxcli module can be installed on any workstation running Windows PowerShell.

  1. Run the FVP Management Server install executable (PernixData FVP Management Server – 1.0.23185.0.exe as of this writing).
  2. Click Next at the Welcome Screen. Read the EULA, choose to accept the terms and click Next.
  3. Choose your destination folder and click Next.
  4. Choose Custom Setup and click Next.
  5. Deselect “Management Server” and select “Management CLI Tools”, click Next.
  6. Click Install, wait, and click Finish.

Importing and Connecting

As with any 3rd party PowerShell module the first thing you have to do is import it. Next connect to the FVP Management Server with the administrator credentials of the vCenter sever associated with Management Server. The module can be imported into either WindowsPowerShell console or the VMware PowerCLI.

import-module prnxcli
Connect-PrnxServer host-ip -Username name -Password password

Working With Flash Clusters

The heart of FVP is the Flash Cluster. There are commands to create a new Flash Cluster, remove a cluster, and return details of a cluster.

#Create New FlashCLuster
New-PrnxFlashCluster DataCenterClusterUUid -Name ClusterName -Description DescriptionString

#Remove an empty Flash Cluster
Remove-PrnxFlashCluster - ObjID FlashClusterName

#Remove all Flash CLusters
Get-PrnxObject -Type FlashCluster | Remove-PrnxFlashCluster

#Remove all VMs, SSDs, and Datastores then delete the FlashCluster
Remove-PrnxFlashCluster -ObjId FlashClusterName -Force

#Get Details about a FlashCluster
Get-PrnxFlashClusterDetail -ObjId ClusterName -FlashCluster FlashClusterName

#Display details for all available FlashCLusters
Get-PrnxObject -Type FlashCluster | Get-PrnxFlashClusterDetail ClusterName

#Note: For all previous examples the variable ClusterName can be the vCenter Cluster's name, UUID or any valid reference.

Working With Datastores

Datastore commands are straight forward. You can add, remove, and list available Datastores.

#Add a Datastore to a Flash Cluster with the default profile
Add-PrnxDatastoreToFlashCluster -FlashCluster FCName -Name DatastoreName

#Add a Datastore to a Flash Cluster, and set a Write Through Acceleration Policy
Add-PrnxDatastoreToFlashCluster -FlashCluster FCName -Name DatastoreName -WriteThrough

#Add a Datastore to a Flash Cluster and a Write Back Acceleration Policy with X Peers
Add-PrnxDatastoreToFlashCluster -FlashCluster FCName -Name DatastoreName -WB -NumWBPeers int

#Remove a DataStore From a Flash CLuster
Remove-PrnxObjectFromFlashCluster -FlashCluster FCName -Name DataStoreName

#Get all VMFS objects
Get-PrnxVMFS

#Get all VMFS objects from a Host
Get-PrnxVMFS -Host HostIPAddress

#Get all VMFS objects in a Cluster
Get-PrnxVMFS -Cluster ClusterName

Working With Virtual Machines

Much like Datastores, you can add, remove, and list available VMs. There are also commands to add and remove VMs from the Blacklist. VMs on the Blacklist do not cache to the devices in the Flash Cluster.

#Add a VM to a Flash Cluster with the default profile
Add-PrnxVirtualMachineToFlashCluster -FlashCluster FCName -Name VMName

#Add a VM to a Flash Cluster and set Write Through Acceleration Policy
Add-PrnxVirtualMachineToFlashCluster -FlashCluster FCName -Name VMName -WriteThrough

#Add a VM to a Flash Cluster and set Write Back Acceleration Policy with X Peers
Add-PrnxVirtualMachineToFlashCluster -FlashCluster FCName -Name VMName -WB -NumWBPeers int

#Remove a VM from a Flash Cluster
Remove-PrnxObjectFromFlashCluster -FlashCluster FCName -Name VMName

#Get all Virtual Machines
Get-PrnxVM

#Get all Virtual Machines from a Host
Get-PrnxVM -Host HostIPAddress

#Get all Virtual Machines in a Cluster
Get-PrnxVM -Cluster ClusterName

#Disable caching for a VM on next power cycle event
Add-PrnxVirtualMachineToBlacklist -ObjID VMName

#Re-enable caching for a VM on next power cycle event
Remove-PrnxVirtualMachineFromBlacklist -ObjID VMName

Working With Flash Devices

Again, like Datastores, you can add and remove from a cluster. You can also list the available SCSI devices.

#Add a Flash Device (SSD) to a Flash Cluster
Add-PrnxFlashDeviceToFlashCluster - FlashCluster FCName -Name DeviceName

#Add a Flash Device (SSD) to a Flash Cluster and force a reformat
Add-PrnxFlashDeviceToFlashCluster - FlashCluster FCName -Name DeviceName -ForceReformat

#Remove a VM from a Flash Cluster
Remove-PrnxObjectFromFlashCluster -FlashCluster FCName -Name DeviceName

#Get all SCSI LUNs
Get-PrnxSCSILun

#Get all SCSI LUNs from a Host
Get-PrnxSCSILun -Host HostIPAddress

#Get all SCSI LUNs in a Cluster
Get-PrnxSCSILun -Cluster ClusterName

#Get all available SCSI LUNs in a Cluster
Get-PrnxSCSILun -Cluster ClusterName -Available

Working With The Generic “PrnxObject” and “PrnxProperty”

PrnxObject is an abstraction of all objects under FVP.  Add and Remove only work for VMs, Datastores, and Flash Devices. Get-PrnxObject returns the properties of any object, Get-PrnxObjectStats returns statistics on an object, and Set-PrnxProperty sets an attribute for any object.

#Add all objects of a certain type to a Flash Cluster
Add-PrnxObjectToFlashCluster -FlashCluster FCName -Type ObjectType

#Remove an object from a Flash Cluster
Remove-PrnxObjectFromFlashCluster -FLashCLuster FCName -Name ObjectName 

#Get all objects from the Management Server
Get-PrnxObject

#Get all objects of a certain type from the Management Server
Get-PrnxObject -Type ObjectType

#Get all objects of a certain type from a host
Get-PrnxObject -Type ObjectType -Host hostname

#Get all objects of a certain type from a cluster
Get-PrnxObject -Type ObjectType -Cluster clustername

#Return the last 10 samples over 400 seconds of statistics for an object
Get-PrnxObjectStats Object

#Return the last X samples of statistics for an object
Get-PrnxObjectStats Object -NumberOfSamples

#Set a Property on an Object
Set-PrnxProperty Object -Name Property -Value Value

Changing Between Write Though and Write Back Modes

Write Policy can be set at either the Datastore or VM level. If set, VM level takes precedence. With Write Through enabled, data is written to the Flash Cluster and back-end SAN at the same time. Write Back allows the data to be written to the back end after the commit has been issued. Write Back can be mirrored across multiple network nodes.

#Set Acceleration Policy to Write Through for a VM or DataStore
Set-PrnxAccelerationPolicy -Name VMorDataStoreName -WT

#Set Acceleration Policy to Write Back for a VM or DataStore with 0, 1, or 2 Peers 
Set-PrnxAccelerationPolicy -Name VMorDataStoreName -WB -NumWBPeers int

#Tag a Virtual Machine as a 'Vadp' Appliance
Set-PrnxAccelerationPolicy VMName -Vadp

Clear PernixData Replay State

Warning!!! The Clear-PrnxReplayState can cause DATA LOSS! Only use under the advisement of PernixData Support or if you are damn sure you know what you are doing.

#Clear Replay State on a Flash Device for all inactive VMs with replay pending
Clear-PrnxReplayState -ObjID DeviceObject -All

#Clear Replay State of a VM
Clear-PrnxReplayState -vmID VMName

Get FVP Version

Displays the version of the FVP Management Server.

Get-PrnxVersion

Getting Further Help

This guide was written to show the most common uses for every command in the prnxcli module. It is by no means an exhaustive list. For example, the -OrderedDestaging Boolean switch is not covered. For a complete list of everything about a command use the following:

get-help PrnxCommand -full

Thanks and Disclaimer

I’d like to thank PernixData data for making such a useful product as well as completely embracing the vCommunity. I would also like to thank the PernixData community on Twitter for everyone’s contribution to spreading the word about (and explaining) FVP.

Special Thanks to Chris Biggins (@fvp_mvp) and Todd Mace (@mctodd) whose help made this post possible.

Now for the disclaimer…

This guide comes with no warranty, implied or otherwise. This information is correct to the best of my knowledge, however it is completely subject to change. I do not work for PernixData and I do not speak for them in any way.

This guide is the product of hours of reading documentation and get-help output as well as my own testing. I hope it saves you time and gives you a better understanding of FVP.