VMware: Configure NetApp NFS datastore(s) Advanced parameters with PowerCLI

3

The settings that NetApp recommends (across all ESX hosts) are:

– NFS.HeartbeatFrequency(NFS.HeartbeatDelta in vSphere) = 12
– NFS.HeartbeatTimeout = 5 (default)
– NFS.HeartbeatMaxFailures = 10

When the number of NFS datastores are increased, we also recommend increasing the heap values:
– Net.TcpipHeapSize =>’30’  to Net.TcpipHeapMax  => ‘120’

To automate this configuration I’ve wrote a PowerCLI script:

#====================================================================#
#   SCRIPT:        Configure_Advanced_NFS_parameters.ps1             #
#   FUNCTION:      Configure NFS / NetApp best practice              #
#   OWNER:         Sander Daems                                      #
#   VENDOR:        NetApp / FAS2040                                  #
#   VSPHERE:       5.0 Update 1 build 623860                         #
#   CREATED:       07/01/2013                                        #
#   MODIFIED:      20/03/2013                                        #
#   VERSION:       v.1.1                                             #
#====================================================================#
#   CHANGELOG:                                                       #
#                                                                    #
#    v.1.0                                                           #
#    - Created script;                                               #
#                                                                    #
#====================================================================#
#   HOST - Specify host and connect                                  #
#====================================================================#
$ESXiHost = Read-Host "Enter ESXi Host name or IP"
Connect-VIServer $ESXiHost
#====================================================================# 
#   ADVANCED - Update TCP Settings                                   #
#====================================================================#
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name Net.TcpipHeapSize -Value 32
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name Net.TcpipHeapMax -Value 128
#====================================================================#
#   ADVANCED - Update NFS Settings                                   #
#====================================================================#
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.MaxVolumes -Value 256
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatMaxFailures -Value 10
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatFrequency -Value 12
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatTimeout -Value 5
#====================================================================#
#   SCRIPT FINISHED                                        #
#====================================================================#
Write-Host "Script finished..." -foregroundcolor yellow
#====================================================================#

More information / source: NetApp Whitepaper

More information / source: VMware KB , VMware KB, VMware KB

About Author

3 thoughts on “VMware: Configure NetApp NFS datastore(s) Advanced parameters with PowerCLI

Leave a Reply

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