VMware NSX

  • 1.  How to find the VM-ID or VM Name if we know the MAC address?

    Posted Feb 06, 2019 08:34 AM

    Hello,

    For learning purpose , I starting building and mapping different tables using NSX Central commands.  I know which MAC address of VMs ( along with their IPs)  ; which VTEPs they are on. What are the host ID and addresses etc.

    However, I can not identify any command which can help me identify which VM has that MAC address? I saw some post where it is suggested to use PowerCLI to find mac-VM information. But can anyone guide me if this is possible with NSX central command?

    Many thanks for your support.



  • 2.  RE: How to find the VM-ID or VM Name if we know the MAC address?

    Broadcom Employee
    Posted Feb 06, 2019 10:25 AM

    Usually for such output net-stats -l on ESXI is the best option - you could run this via powercli as well. If you want to pull MAC-VM Name mapping via NSX cli , one way which i know is like below

    1.  show cluster all details -> to get all Host-ID

    2. show host host-id -> to get all VM-ID

    3. show vm vm-id -> This will fetch vnic-id for the vm.

    4. show vnic vnic-id  . As you can see in the below ouput - not only MAC mapping it also list VXLAN ID ,VTEP and DVS info which might be useful as well.



  • 3.  RE: How to find the VM-ID or VM Name if we know the MAC address?

    Posted Feb 07, 2019 08:28 AM

    Thanks Sreec.

    I was wondering how would I identify the VM-ID?  Do you mean that I need to execute the below commands for every VM? If so then this will become huge task and might not be practical.

    2. show host host-id -> to get all VM-ID

    3. show vm vm-id -> This will fetch vnic-id for the vm.

    Please clarify



  • 4.  RE: How to find the VM-ID or VM Name if we know the MAC address?

    Broadcom Employee
    Posted Feb 07, 2019 12:17 PM

    Yeah it is bit tedious going VM by VM method. I'm unsure about any other options because your ask is slightly different ,its not a default ARP/MAC table output you are looking