What is VAAI VMware (VMware VAAI Functionality)
vStorage APIs for Array Integration (VMware VAAI) is a feature that provides hardware acceleration functionality. It is introduced in ESXi / ESX 4.1 host. It allows your host to offload specific virtual machine and storage management operations to compliant storage devices. With storage hardware assistance, your host performs these operations faster and use less CPU, memory resources, and also consume less storage fabric bandwidth. Functions such as cloning and snapshots can be performed more efficiently by the storage device than by the host.
VMware VAAI also referred to as hardware acceleration or offload APIs. It is to enable communication between VMware vSphere ESXi hosts and storage devices and it reduces the overhead of the ESXi host. It is can significantly improve the performance of storage -intensive operations such as cloning storage, zeroing , and so on. Vaai main goal is to help storage vendors provide hardware assistance to to speed up VMware I/O operations. This is very useful and help solve the problems of the I/O mainly involve systems with high I/O such as Zimbra mail server and database server.
VAAI uses these fundamental operations:
- Atomic Test & Set (ATS), which is used during creation and locking of files on the VMFS volume.
- Clone Blocks/Full Copy/XCOPY, which is used to copy or migrate data within the same physical array.
- Zero Blocks/Write Same, which is used to zero-out disk regions.
- Thin Provisioning in ESXi 5.x and later hosts, which allows the ESXi host to tell the array when the space previously occupied by a virtual machine (whether it is deleted or migrated to another datastore) can be reclaimed on thin provisioned LUNs.
- Block Delete in ESXi 5.x and later hosts, which allows for space to be reclaimed using the SCSI UNMAP feature.
The fundamental operations above are controlled by these advanced settings. To disable VAAI in ESXi/ESX, you must modify these advanced configuration settings:
- HardwareAcceleratedMove
- HardwareAcceleratedInit
- HardwareAcceleratedLocking
Note: These options are enabled by default.
When enabling or disabling VAAI settings, a host reboot is not required. The changes made are effective immediately and bidirectionally.
When VAAI enabled on the host but storage devices do not support or provide only partial support for the host operations, the host reverts to its native methods to perform the unsupported operations.
1. Enabling the VMware VAAI Functionality in ESXi/ESX
To enable VMware VAAI using the vSphere Client:
- Open the VMware vSphere Client.
- In the Inventory pane, select the ESXi/ESX host.
- Click the Configuration tab.
- Under Software, click Advanced Settings.
- Click DataMover.
- Change the DataMover.HardwareAcceleratedMove setting to 1.
- Change the DataMover.HardwareAcceleratedInit setting to 1.
- Click VMFS3.
- Change the VMFS3.HardwareAcceleratedLocking setting to 1.
- Click OK to save your changes.
- Repeat this process for the all ESXi/ESX hosts connected to the storage.
On ESXi/ESX 4.x and 5.x hosts, run esxcfg-advcfg commands to change the three settings :
# esxcfg-advcfg -s 1 /DataMover/HardwareAcceleratedInit # esxcfg-advcfg -s 1 /DataMover/HardwareAcceleratedMove # esxcfg-advcfg -s 1 /VMFS3/HardwareAcceleratedLocking
On ESXi 5.x hosts, run esxcli commands to change the three settings : :
# esxcli system settings advanced set --int-value 1 --option /DataMover/HardwareAcceleratedInit # esxcli system settings advanced set --int-value 1 --option /DataMover/HardwareAcceleratedMove # esxcli system settings advanced set --int-value 1 --option /VMFS3/HardwareAcceleratedLocking
2. Disabling the VMware VAAI Functionality in ESXi/ESX
To disable VMware VAAI using the vSphere Client:
- Open the VMware vSphere Client.
- In the Inventory pane, select the ESXi/ESX host.
- Click the Configuration tab.
- Under Software, click Advanced Settings.
- Click DataMover.
- Change the DataMover.HardwareAcceleratedMove setting to 0.
- Change the DataMover.HardwareAcceleratedInit setting to 0.
- Click VMFS3.
- Change the VMFS3.HardwareAcceleratedLocking setting to 0.
- Click OK to save your changes.
- Repeat this process for the all ESXi/ESX hosts connected to the storage.
On ESXi/ESX 4.x and 5.x hosts, run esxcfg-advcfg commands to change the three settings :
# esxcfg-advcfg -s 0 /DataMover/HardwareAcceleratedInit # esxcfg-advcfg -s 0 /DataMover/HardwareAcceleratedMove # esxcfg-advcfg -s 0 /VMFS3/HardwareAcceleratedLocking
On ESXi 5.x hosts, run esxcli commands to change the three settings : :
# esxcli system settings advanced set --int-value 0 --option /DataMover/HardwareAcceleratedInit # esxcli system settings advanced set --int-value 0 --option /DataMover/HardwareAcceleratedMove # esxcli system settings advanced set --int-value 0 --option /VMFS3/HardwareAcceleratedLocking
3. Verify Existing vaai configuration :
On ESXi/ESX 4.x and 5.x hosts, to determine if VAAI is enabled using the service console in ESX or the vCLI in ESXi, use the esxcfg-advcfg command to check if the options are set to 1 (enabled):
# esxcfg-advcfg -g /DataMover/HardwareAcceleratedInit Value of HardwareAcceleratedInit is 1 # esxcfg-advcfg -g /DataMover/HardwareAcceleratedMove Value of HardwareAcceleratedMove is 1 # esxcfg-advcfg -g /VMFS3/HardwareAcceleratedLocking Value of HardwareAcceleratedLocking is 1
or
On ESXi 5.x hosts, to determine if VAAI is enabled, run these commands and check if Int Value is set to 1 (enabled):
~ # esxcli system settings advanced list -o /DataMover/HardwareAcceleratedMove Path: /DataMover/HardwareAcceleratedMove Type: integer Int Value: 0 Default Int Value: 1 Min Value: 0 Max Value: 1 String Value: Default String Value: Valid Characters: Description: Enable hardware accelerated VMFS data movement (requires compliant hardware) ~ # esxcli system settings advanced list -o /DataMover/HardwareAcceleratedInit Path: /DataMover/HardwareAcceleratedInit Type: integer Int Value: 0 Default Int Value: 1 Min Value: 0 Max Value: 1 String Value: Default String Value: Valid Characters: Description: Enable hardware accelerated VMFS data initialization (requires compliant hardware) ~ # esxcli system settings advanced list -o /VMFS3/HardwareAcceleratedLocking Path: /VMFS3/HardwareAcceleratedLocking Type: integer Int Value: 1 Default Int Value: 1 Min Value: 0 Max Value: 1 String Value: Default String Value: Valid Characters: Description: Enable hardware accelerated VMFS locking (requires compliant hardware)
4. Additional esxcfg-advcfg command and usage :
~ # vmware -v VMware ESXi 5.5.0 build-2068190 ~ # esxcfg-advcfg This usage Usage: esxcfg-advcfg [] -g|--get Get the value of the VMkernel advanced configuration option -s|--set Set the value of the VMkernel advanced configuration option -d|--default Reset a VMkernel advanced config option to default -l|--list List all VMkernel advanced config options -q|--quiet Suppress output -k|--set-kernel Set a VMkernel load time option value for the next boot. -j|--get-kernel Get a VMkernel load time option value for the next boot. -c|--get-config Get the value of a specific line in esx.conf. -m|--set-message Set DCUI welcome message. -u|--uuid Ensure the Vmkernel system UUID is set and print it. -G|--get-user-var Get the value of a user specified generic value. Requires the --user-var option. -S|--set-user-var Set the value of a user specified generic value. Requires the --user-var option. -D|--del-user-var Delete the value of user specified generic value. Requires the --user-var option. -U|--user-var The name of the user variable to user for --get-user-var --set-user-var and --delete-user-var. -A|--add-option This adds an advanced variable to /UserVars tree of the Advanced Options. This is different from the --user-var options, which do not show in the VCUI and only contain simple user vars for use at boot time. An advanced option requires the --add-type, --add-desc, --add-default, --add-name and --add-min, --add-max if type is int -T|--add-type The type of user advanced option to add, must be either 'string' or 'int' -E|--add-desc The description of the user advanced option to add -F|--add-default The default value of the user advanced option to add -N|--add-min The min value of the user advanced option to add (int only) -M|--add-max The max value of the user advanced option to add (int only) -H|--add-hidden The hidden value of the user advanced option to add, must be either true or false. (default false) -L|--del-option Delete a UserVars advanced option added with the -A command -V|--has-option Return 0 from the command if the option exists return 1 otherwise -h|--help Show this message. -r|--restore Restore all advanced options from the configuration file. (FOR INTERNAL USE ONLY).