PowerCLI

 View Only
  • 1.  Set Hyper Threading on ESXi

    Posted Aug 10, 2022 06:44 AM

    Hi,

    I would like to enable and set the hyper threading on the server. basically, I want to update the parameters as below on all the hosts. how can i do it. please help.

    Get-VMHost | Select Name,HyperthreadingActive,
    @{N = 'UserVars.SuppressHyperthreadWarning'; E = { (Get-AdvancedSetting -Entity $_ -Name 'UserVars.SuppressHyperthreadWarning').Value } },
    @{N = 'VMkernel.Boot.hyperthreading'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.hyperthreading').Value } },
    @{N = 'VMkernel.Boot.HyperthreadingMitigation'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.HyperthreadingMitigation').Value } }



  • 2.  RE: Set Hyper Threading on ESXi

    Posted Aug 10, 2022 06:54 AM

    You enable HT in the BIOS.
    So unless you have a PS module to interact with the BIOS, that can not be done from PS.

    The other 3 settings can be done via Set-AdvancedSetting



  • 3.  RE: Set Hyper Threading on ESXi

    Posted Aug 10, 2022 06:56 AM

    Yes, LucD. I have enabled the HT in the BIOS. now how do I need to set from ESXi end ?



  • 4.  RE: Set Hyper Threading on ESXi
    Best Answer

    Posted Aug 10, 2022 07:00 AM

    When it is active in the BIOS, you have to configure the advanced setting VMkernel.Boot.hyperthreading

    Get-VMHost |
    ForEach-Object -Process {
      Get-AdvancedSetting -Entity $_ -Name 'UserVars.SuppressHyperthreadWarning' | Set-AdvancedSetting -Value 0 -Confirm:$false
      Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.hyperthreading' | Set-AdvancedSetting -Value $true -Confirm:$false
      Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.HyperthreadingMitigation' | Set-AdvancedSetting -Value $false -Confirm:$false
    }

     



  • 5.  RE: Set Hyper Threading on ESXi

    Posted Aug 10, 2022 07:18 AM

    Thank you very much LucD, that worked