Thursday, February 5, 2015

PowerCLI and Virtual SANs Fling Information

Managing your VSAN with PowerCLI

If you are interested in managing your VSAN using automation tools, go to labs.vmware.com and find and download the recent VSAN "fling". Flings are pet projects for VMware engineers. Lots of very useful ones, including this one. After downloading and installing this fling, run the following commands to get help on getting started.

Import-Module VMware.VimAutomation.Extensions

Get-Command -Module VMware.VimAutomation.Extensions

Here are a few examples that I was able to find in no time whatsoever:

Retrieve a disk with canonical name “mpx.vmhba2:C0:T1:L0″ on a specific host:

Get-VsanDisk -VMHost MyVMHost -CanonicalName “mpx.vmhba2:C0:T1:L0″

Retrieve disks that are part of a VSAN disk group that has a disk with
canonical name “mpx.vmhba2:C0:T2:L1″