Verify VAAI settings with PowerCLI

I recently had a need to validate that all hosts in a specific vCenter had appropriate vStorage API for Array Integration (VAAI) settings. I didn’t want to change the values, I was just looking for the existing values. This short code will do just that:

1
2
3
4
5
6
7
8
9
10
11
12
13
$myreport = @()
Get-VMHost | %{
    $DataMoverHardwareAcceleratedMove = $_ | Get-VMHostAdvancedConfiguration -Name DataMover.HardwareAcceleratedMove
    $VMFS3HardwareAcceleratedLocking = $_ | Get-VMHostAdvancedConfiguration -Name VMFS3.HardwareAcceleratedLocking
    $DataMoverHardwareAcceleratedInit = $_ | Get-VMHostAdvancedConfiguration -Name DataMover.HardwareAcceleratedInit
    $myreport += new-object psobject -property @{
        Host = $_.Name
        DataMoverHardwareAcceleratedMove = [string]$DataMoverHardwareAcceleratedMove.Values
        VMFS3HardwareAcceleratedLocking = [string]$VMFS3HardwareAcceleratedLocking.Values
        DataMoverHardwareAcceleratedInit = [string]$DataMoverHardwareAcceleratedInit.Values
    }
}
$myreport

The resulting output will list the setting for each option value for each host. Note: 0 = disabled and 1 = enabled.

If you need to make changes to these values on a large number of hosts, check out this article: http://nickapedia.com/2011/03/01/powercli-and-vaai-quick-and-dirty-script/.

Leave a Reply

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

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.