How to find which vmnic a VM is using on ESXi?
search cancel

How to find which vmnic a VM is using on ESXi?

book

Article ID: 385143

calendar_today

Updated On:

Products

VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0

Issue/Introduction

This article shows three ways to find which VMNIC a VM uses on ESXi.

Environment

VMware vSphere ESXi 7.0.x

VMware vSphere ESXi 8.0.x

Resolution

  • Method 1 esxtop
    SSH to ESXi host, Run the command "esxtop" press enter, and press "n", Under the TEAM-PNIC column, find the vmnic used by the target VM
  • Method 2 vsish
    SSH to ESXi host, Run the command "net-stats -l" to get the network adapter ID(PortNum) and vSwitch name which VM is located of target VM.
    Then get the vminc of the actual use with the command "vsish -e cat /net/portsets/<vSwitch_name>/ports/<switchport_number>/teamUplink"

    you also can refer to KB Packet capture on ESXi using the pktcap-uw tool in ESXi 5.5 and later
  • Method 3 esxcli network
    SSH to ESXi host, Run the command "esxcli network vm list" to find World ID of target VM.
    Then run the command "esxcli network vm port list -w <World ID>"
  • Method 4: SSH into the ESXi Host and Run the Command: netdbg vswitch instance list
  • Note: This command will not display NSX switches.