VMware vSphere

 View Only
  • 1.  VMXNet3 Power Management

    Posted Sep 17, 2019 06:06 PM

    After couple of instances that a Windows 2016 VM not responsive to Network traffic and passive nodes in cluster not becoming active I found out following:

    vNIC with VMXNet3 by default has the option selected "Allow the computer to turn off this device to save power"

    I can not think of a good reason why VMware would do this and make it default; If you have any please enlighten me

    If someone can help with any script where I can disable/uncheck this option on all the VMs that will be great



  • 2.  RE: VMXNet3 Power Management

    Posted Feb 07, 2024 05:33 PM

    This article that explains this setting says it applies to Win2008 : https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/power-management-on-network-adapter

    The question is: is it still valid on more recent versions? I can't find such information.



  • 3.  RE: VMXNet3 Power Management

    Posted Feb 07, 2024 07:45 PM

    maybe the following can help you 

    you can use Disable-NetAdapterPowerManagement CMDlet to disable on selected ethernet 

    https://learn.microsoft.com/en-us/powershell/module/netadapter/set-netadapterpowermanagement?view=windowsserver2022-ps

    $adapters = Get-NetAdapter
    
    $vmxnetAdapters = $adapters | Where-Object { $_.Name -like "vmxnet*" }
    
    foreach ($adapter in $vmxnetAdapters) {
        Disable-NetAdapterPowerManagement -Name $adapter.Name
    }
    
    Write-Host "Power management disabled for vmxnet adapters."

    and you need to find a method to execute this script on your virtual machines 

    maybe active directory or psexec or invokecommand can help you to execute this script on remote systems 

    # Connect to vCenter
    Connect-VIServer -Server "vcenter.example.com"
    
    # Get VMs with vmxnet adapters
    $vms = Get-VM | Where-Object { $_.NetworkAdapter | Where-Object {$_.Name -like "vmxnet*"} -ne $null }
    
    # Run the script on each VM
    Invoke-VMScript -VM $vms -ScriptBlock { Import-Module NetAdapter; & $PSItem }


    you can modify those according to you environment and scenario