Tracking a VM in a Nexus 1000v Virtual Network

by Paul on February 9, 2011

In this quick post, I’d like to highlight a few helpful commands that will allow you to track a VM throughout the virtual network. All of the following commands are executed on the VSM.

If you need to get a detailed look at your configured VLANs or to see if one is missing or not yet configured, you can run show vlan or show vlan brief for a quick view. To get similar views for port-profiles, you can run show port-profile or show port-profile brief. These commands are helpful for getting basic switch configuration info. But what if you need more than basic switch information? What if you want to view all of the pertinent network information about your VM? Below are just some of the available commands to help you get better insight to the VM’s network identity.

In this example, we are going to get the information from a VM called testvm1. The first thing we’ll want to do is find out which VLAN and interface the VM is using. To get this information, run the following command:

show port-profile usage | include <vm-name>

n1kv-1# show port-profile usage | include testvm*
vm-vlan7             Veth10      Net Adapter 1  testvm1

The output above shows you the name of the port profile (name of VLAN), the interface, the VM’s adapter, and the VM’s name.

Now, let’s say you need more info on the VM, such as statistics on the interface or to which VEM (vSphere host) the interface is attached, you can use the show interface command as demonstrated below:

show interface <interface name>

n1kv-1# show int veth10
Vethernet10 is up
    Port description is testvm1, Network Adapter 1
    Hardware is Virtual, address is 0000.0323.001f
    Owner is VM "testvm1", adapter is Network Adapter 1
    Active on module 2
    VMware DVS port 281
    Port-Profile is vm-vlan7
    Port mode is access
    5 minute input rate 10 bytes/second, 0 packets/second
    5 minute output rate 368 bytes/second, 4 packets/second
    20067 Input Packets 17166 Unicast Packets
    0 Multicast Packets 2901 Broadcast Packets
    2967221 Bytes
    1611073 Output Packets 17586 Unicast Packets
    339358 Multicast Packets 1254129 Broadcast Packets 1593487 Flood Packets
    117192891 Bytes
    0 Input Packet Drops 0 Output Packet Drops

The output above displays a lot of information. Here you can see that the interface is up and the MAC address of the virtual adapter. A key piece of information here is the active module. This tells you to which VEM (virtual ethernet module installed on the ESX host) the interface is connected.

To find out which host is considered module number 2, you can run the following command:

show module

n1kv-1# show mod
Mod  Ports  Module-Type                      Model              Status
---  -----  -------------------------------- ------------------ ------------
1    0      Virtual Supervisor Module        Nexus1000V         active *
2    248    Virtual Ethernet Module          NA                 ok
3    248    Virtual Ethernet Module          NA                 ok

Mod  Sw               Hw
---  ---------------  ------
1    4.2(1)SV1(4)    0.0
2    4.2(1)SV1(4)    VMware ESXi 4.1.0 Releasebuild-260247 (2.0)
3    4.2(1)SV1(4)    VMware ESX 4.1.0 Releasebuild-260247 (2.0)

Mod  MAC-Address(es)                         Serial-Num
---  --------------------------------------  ----------
1    00-00-00-00-00-00 to 00-00-00-00-00-00  NA
2    00-00-00-00-00-00 to 00-00-00-00-00-00  NA
3    00-00-00-00-00-00 to 00-00-00-00-00-00  NA

Mod  Server-IP        Server-UUID                           Server-Name
---  ---------------  ------------------------------------  --------------------
1     NA                                    NA
2    00000000-0001-0002-0000-000000000123  esxi-1.homelab.local
3    00000000-0001-0002-0000-000000000124  esx2.homelab.local

The output displays the information about the VSM and all of the registered and connected VEMs. As you can see in this example, module 2 is esxi-1.homelab.local and has an IP of This is a useful command for checking to see if your VEMs are properly communicating with the VSM.

These are just a few commands I found helpful for troubleshooting and tracking VMs in a virtual environment.

Below are links to a few sites with a lot of Nexus 1000v info.


List of Cisco Nexus 1000v Troubleshooting Guides – Cisco
Nexus 1000v Install via GUI – Chris Fendya
Jason Nash’s Blog – Tons of great Nexus 1000v posts
Brad Hedlund’s Blog – Another great resource for anything network related.

Previous post:

Next post: