vStorage APIs for Array Integration, or VAAI, allows the vSphere ESXi hosts to offload some of their storage workloads to the Storage arrays.

Some of these workloads might be Storage vMotion a VM or provisioning a vmdk among others. VAAI is generally enabled by default on Hosts and most Storage Arrays support it. There are however, some storage arrays that do not and there are instances when you might want to disable it. Unlike most vSphere features though, it isn’t the easiest thing to even confirm that it is enabled or disabled.

There are three settings that determine whether VAAI is enabled or disabled. These settings are

  • DataMover.HardwareAcceleratedMove
  • DataMover.HardwareAcceleratedInit
  • VMFS3.HardwareAcceleratedLocking

If those three settings are enabled then VAAI is enabled. To even confirm those three are enabled though you have to do a small amount of digging into the host’s advanced settings. To make a long story short, it isn’t the easiset thing to confirm, especially if you want to check the VAAI status of multiple hosts.

All of that leads up to…I have a script for you!


Function Get-HostVaai{
<#
.SYNOPSIS
 This script will report which hosts have VAAI enabled
.DESCRIPTION
 www.vnoob.com
.PARAMETER Hosts
 Which hosts will be reported
Author:
 Conrad Ramos <conrad@vnoob.com> https://www.vnoob.com/

Date: 2013-11-1
 Revision: 1.0
#>

param($hosts="*")

$Output=@()
$vmhosts=get-vmhost $hosts
$settings=$vmhosts |Get-AdvancedSetting

ForEach ($vmhost in $vmhosts)
{
$temp="" |Select -property VMHost, VAAI
$temp.vmhost=$vmhost
$hostsettings=$settings |Where-Object {$_.entity -like $vmhost}
IF ((($hostsettings|? {$_.name -like "datamover.hardwareacceleratedmove" -or $_.name -like "datamover.hardwareacceleratedinit" -or $_.name -like "VMFS3.HardwareAcceleratedLocking"}).value |Measure-Object -Sum).sum -eq 3)
{$temp.vaai="Enabled"}
Else {$temp.vaai="Disabled"}
$Output+=$temp
}
$output
}

In action:

hostvaai

In essence, the script checks those three settings and if all of them are enabled it defines that host as been VAAI Enabled.

By default it will check all the hosts, but you can also use the -hosts parameter if you want to decide explicitly which hosts will be checked.

Hope this helps!

References:

VMware KB: Disabling the VAAI functionality in ESXi/ESX

 Frequently Asked Questions for vStorage APIs for Array Integration 


0 Comments

Leave a Reply