Recently we hit a wall with our virtual environment. If you didn’t know the e1000 NIC in VMware is a emulated hardware item, that means it requires extra cpu and memory resources to run. VMXNet3 is a much better choice in almost all ways (there are a few exceptions), its also a 10gb NIC which is a huge benefit in our environment.
My environment consist of over 500 VMs, manually looking up each VM to see which one has a e1000 adapter would be a pain. Lets leverage powerCLI/powershell!
1 2 |
$result = @(ForEach( $VM in (Get-VM) ) { $VM|Where{ $VM|Get-NetworkAdapter|Where{ $_.ExtensionData -like "*e1000*" } } }) $result | Format-Table -auto | Out-File C:\folder\file.txt |
The above code will pull down any VM in your environment with an e1000 or e1000e adapter. The output will look like this:
1 2 3 4 |
Name PowerState Num CPUs MemoryGB ---- ---------- -------- -------- Server1 PoweredOn 1 8.000 Server2 PoweredOn 4 4.000 |