VMware Cloud Community
oasisinin
Enthusiast
Enthusiast

VMXNet3 Power Management

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"

vmxnet3_po.JPG

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

0 Kudos
2 Replies
Gimel
Contributor
Contributor

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...

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

0 Kudos
sdtslmn
Enthusiast
Enthusiast

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=wi...

$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