VMware Cloud Community
wboaz
Enthusiast
Enthusiast
Jump to solution

How to determine guest network adapter type

How can I determine whether a guest is configured with VMxNet, VMxNet 2 (Enhanced), and VMxNet3?

This code just returns VMxNet, Flexible or E1000 but doesn't differentiate betwee the types of VMxNet adapters.

$networkName = "Network0"

$net = Get-NetworkAdapter -Vm $vm \

where {$_.NetworkName -eq $networkName}

$myObj.VMNicType = $net.Type

Reply
0 Kudos
1 Solution

Accepted Solutions
Herschelle
Enthusiast
Enthusiast
Jump to solution

Question: What version of ESX / VC / PowerCLI are you using?

As I just tried this on my vSphere ESX / VC and PowerCli are all v4 Update 1 and it works fine for me.

Get-NetworkAdapter -VM MyVM | Select Name, Type | Format-List

Name : Network adapter 1
Type : e1000

Name : Network adapter 2
Type : Vmxnet3

Name : Network adapter 3
Type : EnhancedVmxnet

View solution in original post

Reply
0 Kudos
2 Replies
Herschelle
Enthusiast
Enthusiast
Jump to solution

Question: What version of ESX / VC / PowerCLI are you using?

As I just tried this on my vSphere ESX / VC and PowerCli are all v4 Update 1 and it works fine for me.

Get-NetworkAdapter -VM MyVM | Select Name, Type | Format-List

Name : Network adapter 1
Type : e1000

Name : Network adapter 2
Type : Vmxnet3

Name : Network adapter 3
Type : EnhancedVmxnet

Reply
0 Kudos
jeveenj
Enthusiast
Enthusiast
Jump to solution

Hi,

Using VI client are you able to find different type of network adapters attached to the VM. (You can use edit setting of VM, select the network adapter which will give the Adapter type).

Since,

 
Connect-VIServer <server> -User <user> -Password <password>
Get-NetworkAdapter -VM (Get-VM) | Select Name, Type

Works fine with ESX 4.0 and Power CLI 4.0 u1.

-If you found this information useful, please consider awarding points for Correct or Helpful.