If you are using Nexenta or Nexenta CE (Community Edition) v4.04 you may have noticed that within VMware, the Hardware Acceleration (VAAI) status is listed as Unknown.
Nexenta v4.04 and possibly some other versions ship with VAAI in a default / disabled state. Follow these steps to Enable Hardware Acceleration:
- Download and extract the Nexenta vaaictl python script from the following link: http://downloads.nexenta.com/cdn/NexentaStor/utilities/vaaictl.zip
- If the link doesn’t work, I have pasted the output of the file below.)
- Copy the vaaictl file to your Nexenta box to /tmp
- Using WinSCP with windows via SFTP works well for this.
- SSH into your Nexenta box using PuTTY or another tool. Enter Expert mode by running:
option expert_mode =1 !bash
- Run the following commands to check the status of VAAI:
cd /tmp chmod 555 ./vaaictl ./vaaictl --status
- Output: “Current status is defaulted.”
- To enable VAAI, run the following:
sudo ./vaaictl --enable
- Output: “Changing from defaulted to enable”
- You can now re-check the status of VAAI:
./vaaictl --status
- Output: “Current status is enabled.”
My output from steps 4 through 6:
Going back to VMware, make sure to rescan your storage adapters and in some cases refresh. Once that it is done, you should now see that Hardware Acceleration is Supported!
Nexenta has moved the link around a bit and I was curious as to what was in the vaaictl file, so I have included the output below. You can manually recreate the Python script by copying and pasting the output into a file.
#!/usr/bin/python from optparse import OptionParser import re import sys import os import tempfile def parse_opts(): parser = OptionParser(description="Manage NexentaStor VAAI settings.") parser.add_option('--enable', action='store_true', dest='enable', help='Enable VAAI.') parser.add_option('--disable', action='store_true', dest='disable', help='Disable VAAI.') parser.add_option('--default', action='store_true', dest='default', help='Accept system default.') parser.add_option('--status', action='store_true', dest='status', help='Show current setting in file.') options, args = parser.parse_args() if len(args) != 0: parser.error("Unknown argument.") mode = None if options.enable: mode = 'enable' if options.disable or options.default or options.status: parser.error("Must specify a single operation.") if options.disable: mode = 'disable' if options.default or options.status: parser.error("Must specify a single operation.") if options.default: mode = 'default' if options.status: parser.error("Must specify a single operation.") if options.status: mode = 'status' if mode == None: parser.error("Must specify an operation.") return mode def parse_file(mode): status = None keys = [ 'HardwareAcceleratedInit', 'HardwareAcceleratedLocking', 'HardwareAcceleratedMove' ] lines = [] matches = {} with open('/etc/system', 'r') as system_file: vaai_re = re.compile('^\s*set\s+stmf_sbd:(HardwareAcceleratedInit|' 'HardwareAcceleratedLocking|' 'HardwareAcceleratedMove)\s+=\s+(\w+)\s*$') for line in system_file: m = vaai_re.match(line) if m: matches[m.group(1)] = m.group(2) if mode == 'enable': line = "set stmf_sbd:%s = 1\n" % m.group(1) lines.append(line) if mode == 'disable': line = "set stmf_sbd:%s = 0\n" % m.group(1) lines.append(line) else: if mode == 'enable' or mode == 'disable' or mode == 'default': lines.append(line) ret = 0 missing = False if len(matches) == 0: status = 'defaulted' elif mode == "status" and len(matches) != len(keys): sys.stderr.write("Not all settings found when performing %s operation. " "Reset to defaults and repeat operation.\n" % mode) missing = True ret = 1 if not status == 'defaulted': d = dict((matches[key], key) for key in matches) if len(d) != 1 or missing: if mode == 'status': if len(d) != 1: sys.stderr.write("Inconsistent settings found when performing %s operation. " "Checking other settings, reset to defaults, and apply settings again." % mode) print "Applied values:" for key in matches: i == int(matches[key]) if i != 0 and i != 1: sys.stderr.write("Illegal value %s for %s.\n" % (matches[key], key)) else: print "%s: %d" % (key, i) sys.exit(1) else: status = 'inconsistent' else: for key in matches: i = int(matches[key]) if i == 0: status = 'disabled' break elif i == 1: status = 'enabled' break else: sys.stderr.write("Illegal value %s for %s.\n" % (matches[key], key)) ret = 1 if ret: sys.exit(ret) if mode == 'enable' and status == 'enabled': return if mode == 'disable' and status == 'disabled': return if mode == 'default' and status == 'defaulted': return if mode == 'status': print "Current status is %s." % status else: print "Changing from %s to %s" % (status, mode) if len(matches) != len(keys) and mode != 'default': for k in keys: if k in matches: next line = "set stmf_sbd:%s = %d\n" % (k, 1 if mode == 'enable' else 0) lines.append(line) tmpfd, tmpname = tempfile.mkstemp(prefix='system', dir='/etc') temp_file = os.fdopen(tmpfd, 'w') temp_file.writelines(lines) temp_file.close() os.chmod(tmpname, 0644) os.chown(tmpname, 0, 0) os.rename('/etc/system', '/etc/system.vaaictl.bak') os.rename(tmpname, '/etc/system') mode = parse_opts() parse_file(mode)
Thanks for this post. I was stuck upgrading my nexenta lab to 4.0.4 until I realized the existing storage was created in ATS only mode. Adding the VAAI and rebooting my storage and esxi host solved the trouble. I was able to re-mount the existing datastore in place.
You’re welcome! I’m glad it was helpful.