Kontrola stavu VAAI na ESX hostoch a jeho vypnutie/zapnutie

Pri problémoch s diskovými poliami, sa môže stať, že správca vSphere dostane otázku, či má zapnuté VAAI na ESX hostoch. Ak odpoveď znie áno, môže prísť prosba o jeho vypnutie.

Script na kontrolu stavu VAAI:

add-pssnapin VMware.VimAutomation.Core
Connect-VIserver -server vc.yourcompany.com

$report = @()

$esx = (Get-VMhost -Location Cluster1,Cluster2)

$esx | ForEach-Object {

             $row = "" | Select-Object "Host", "Move", "Init", "VMFS3", "ATS"

             $row. "Host" = $_

             $row."Move" = (Get-AdvancedSettings -Entity $_.Name -Name                                                                   DataMover.HardwareAccelerateMove).value

             $row."Init" = (Get-AdvancedSettings -Entity $_.Name -Name DataMover.HardwareAccelerateInit).value

             $row."VMFS3" = (Get-AdvancedSettings -Entity $_.Name -Name VMFS3.HardwareAccelerateLocking).value

             $row."ATS" = (Get-AdvancedSettings -Entity $_.Name -Name VMFS3.UseATSForHBOnVMFS5).value

             }

$report | Format-Table -AutoSize

Script na vypnutie/zapnutie VAAI:

Add-PSsnapin VMware.VimAutomation.Core

Connect-VIServer -Server vc.yourcompany.com

### 0 -vypnute 1 -zapnute

$status = 0

$report = @()

$esx = (Get-VMHost -Location Cluster1,Cluster2).Name

$esx | ForEach-Object {

             Get-AdvancedSettings -Entity (Get-VMHost $_) -Name VMFS3.UseATSForHBOnVMFS5 | Set-AdvancedSettings -Value $status -Confirm:$false

             Get-AdvancedSettings -Entity (Get-VMHost $_) -Name DataMover.HardwareAcceleratedMove | Set-AdvancedSettings -Value $status -Confirm:$false

             Get-AdvancedSettings -Entity (Get-VMHost $_) -Name DataMover.HardwareAcceleratedInit | Set-AdvancedSettings -Value $status -Confirm:$false

             Get-AdvancedSettings -Entity (Get-VMHost $_) -Name VMFS3.HardwareAcceleratedLocking | Set-AdvancedSettings -Value $status -Confirm:$false

}

Author: Martin

Infrastructure engineer | virtualization & cloud enthusiast | vSphere specialist | blogger | VMware vExpert 2017, 2018, 2019, 2020 | VMCE | Slovak VMUG Leader |  user group ambassador for kmug.sk | husband&father

Leave a Reply

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