VMware vSphere

 View Only
  • 1.  How to find which vmnic a VM is using on ESXi?

    Posted Jan 17, 2011 08:01 PM

    Hello all,

    Hopefully this is an easy one for someone. I'm running vSphere4 and using ESXi4. I would like to know if it is possible, from within the vClient, if you can tell which vmnic a VM is using when connected to the Port Group? I have two physical adapters teamed in my vSwitch that my VMs are on. Each VM is only setup for a single nic in its configuration (if that matters). I would like to know if it was possible, from within the vClient, to tell which adapter is being used.

    I had one of my fiber connectors go out on one physical adapters that was in the switch that connected to the network so some of my VMs where connected to the network and some of them were not. I figured out if was the fiber connect and replaced it. Everything was fine after that but it got me to thinking about this question.

    I don't use vMA to much ( which I plan to start learning more ) and since ESXi only has the troubleshooting console, I didn't know where else to look.

    Thanks for the help.



  • 2.  RE: How to find which vmnic a VM is using on ESXi?

    Posted Jan 17, 2011 09:49 PM

    Hi,

    A portgroup is connected to a vSwitch, and the uplinks from there can be thought of as a physical switch's uplinks.

    If you plug a server into a physical switch, then team the uplinks from that switch to another switch, you can see it doesn't make sense to ask which of the ports in that uplink is being used by that server.

    If it's important to you, the only option is to set the team to an "active/standby" configuration, such that, as long as the active has link, you will know it is in use.



  • 3.  RE: How to find which vmnic a VM is using on ESXi?

    Posted Jan 19, 2011 09:47 PM

    One possible way, however not from the vSphere Client, is to logon your physical switch and check the MAC address tables and see on which port your VMs MAC is visible..



  • 4.  RE: How to find which vmnic a VM is using on ESXi?

    Broadcom Employee
    Posted Jan 19, 2011 09:59 PM

    esxtop using "n" option for Network can give you the exact mapping and there is a local "esxtop" within the Tech Support shell, you also have resxtop on vMA, else the other suggestions are other methods.



  • 5.  RE: How to find which vmnic a VM is using on ESXi?

    Broadcom Employee
    Posted Dec 23, 2024 06:49 AM

    Besides using esxtop tool, we can also use esxcli network command to find every VM's Team Uplink.

    1. Using esxcli network vm list to find the target VM's World ID.

    2. Using esxcli network vm port list -w <world-id> to show target VM's Team Uplink




  • 6.  RE: How to find which vmnic a VM is using on ESXi?

    Broadcom Employee
    Posted Dec 24, 2024 01:42 AM
    Edited by Sriram ChunchankatteMelukote Dec 24, 2024 01:43 AM

    Hello,

    Another way to get all information related to the dvportsets and the VM connections on the hosts is to run the 'net-stats -l' command on the ESXi host. This will give the information related to the vmnics attached to the VMs through the dvport groups.




  • 7.  RE: How to find which vmnic a VM is using on ESXi?

    Broadcom Employee
    Posted Dec 25, 2024 01:02 AM

    Hello Sriam,

    'net-stats -l'  will not give the information related to the vmnics attached to the VMs through the dvport groups directly, 

    But we can use 'net-stats -l' first to find target VM's network adapter relate-portnumber ID first, and use vsish command to confirm which vmnic a VM is using on ESXi.




  • 8.  RE: How to find which vmnic a VM is using on ESXi?

    Broadcom Employee
    Posted Dec 25, 2024 01:20 AM

    Hello Yao Zhang,

    Thanks for your update. Yes true but when we were into the ENS stack testing we were using this command regularly at the host level and yes from the dvportgroups we can get the vmnics attached. As you said vsish commands can also be used to get the vmnic information of the VM on a ESXi.