Disabling the new ATS heartbeat with PowerCLI

The issue with ESXi 5.5 U2 and 6 seems to be more wide-spread than just IBM storage.   One of the main problems with the current solution in the KB is that is requires that you login to each host individually.  A very smart co-worker provided this script with help from VMware’s BCS team.   He has given me permission to post it to assist others.   No promise that it works perfectly but it should help you on your path.

 

A few notes:

  • It is set to test for the presence of the setting and do nothing if already set
  • It is set to test if it’s 5.5 or higher
  • It is set to test if it’s build 2068190 or higher

 

Param(

$VIServer = (Read-Host “Type the vCenter servers name and hit [ENTER]”)

)

if ((Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null)

{Add-PsSnapin VMware.VimAutomation.Core}  <# Checks for the existence of and if not found,

loads the VMware snap-in#>

if (!($DefaultVIServer.Name -eq $VIServer -and $DefaultVIServer.IsConnected -eq “True”)) {

Connect-VIServer $VIServer -Credential (Get-Credential) -ErrorAction Stop | Out-Null

}

 

$vmhosts = Get-Cluster | Sort Name | Get-VMHost | Sort Name

foreach($vmhost in $vmhosts){

If($vmhost.ApiVersion -ge “5.5”){

If($vmhost.Build -ge “2068190”){

$esxcli = Get-EsxCli -vmhost $vmhost

If(($esxcli.system.settings.advanced.list($false, “/VMFS3/UseATSForHBOnVMFS5”)).IntValue -eq “0”){

Write-Host $vmhost.Name “already set to revert heartbeat” -ForegroundColor White

}

Else{

Write-host “Starting on” $vmHost.name -ForegroundColor Yellow

$esxcli = Get-EsxCli -vmhost $vmhost

$esxcli.system.settings.advanced.set($false, 1, “/VMFS3/UseATSForHBOnVMFS5”)

Write-Host “Finished with” $vmHost.name -ForegroundColor Green

}

}

Else{

Write-Host $vmhost.name “build is less than U2 (2068190), so skipping host” -ForegroundColor Red

}

}

Else{

Write-Host $vmhost.Name “ESXi version is less than 5.5, so skipping host” -ForegroundColor Red

}

}

 

I hope it helps you. Please don’t use it unless directed by VMware support.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.