VMware

Changing VMware advanced settings via Powershell

I am in progress of adding more NFS datastores to my VMware cluster and realized that there is a max of 8 mounts in the default configuration. The blog http://blog.scottlowe.org/2010/01/31/emc-celerra-optimizations-for-vmware-on-nfs/ describes additional settings that should be changed when updating the number of VM mounts as well.

So, how do you change some discrete settings on dozens of ESX hosts without dedicating and entire day to it? How do you inventory those settings to ensure you got everything done? Thankfully there is powershell.

Inventorying the NFS and NET advanced settings
foreach ($ESXHost in get-cluster Cluster_01 | get-vmhost)
{
Get-VMHostAdvancedConfiguration -VMHost $ESXHost -Name NFS.MaxVolumes
Get-VMHostAdvancedConfiguration -VMHost $ESXHost -Name Net.TcpipHeap*
}

Updating NFS and NET advanced settings
foreach ($ESXHost in get-cluster Cluster_01 | get-vmhost)
{
set-VMHostAdvancedConfiguration -VMHost $ESXHost -Name NFS.MaxVolumes -Value 32
set-VMHostAdvancedConfiguration -VMHost $ESXHost -Name Net.TcpipHeapSize -Value 30
set-VMHostAdvancedConfiguration -VMHost $ESXHost -Name Net.TcpipHeapMax -Value 120
}

Leave a Reply