This document describes about the logs and ways to collect them for a Nexus 1000v. Logs are the primary way to identify and troubleshoot issues with Nexus 1000v. Cisco Nexus 1000V generates many types of system messages on the switch and sends them to a syslog server, if configured.
Follow the steps to configure syslog server to send logs to:
n1kv# conf t
n1kv (conf)# logging server <server_ip_add> 6 facility local1
Cisco Nexus 1000V has 2 parts:
Virtual supervisor module (VSM) - This is the control software of the Cisco Nexus 1000V distributed virtual switch. It runs on a virtual machine (VM) and is based on NX-OS software.
Virtual Ethernet module (VEM) - This is the part of Cisco Nexus 1000V that actually switches data traffic. It runs on a VMware ESX 4.0 host. Several VEMs are controlled by one VSM. All the VEMs that form a switch domain should be in the same virtual Data Center as defined by VMware VirtualCenter.
When troubleshooting the Nexus 1000v switch, there are a couple of different log bundles that can be generated within the environment. Logs can be gathered from each component of the Nexus 1000v switch – the VSM and VEMs. Like other Nexus switches, a tech-support file can be generated and downloaded from the VSM. The tech-support file contains much of the same information you would see in a physical Nexus switch tech-support: version, logging logfile, configuration, interface details/counters, process status, etc. In order to collect a tech-support from the VSM, there are a couple of options:
Save Output From a Logged Session:
show tech-support svs | no-more
Save Output to Bootflash and Copy to a Remote Server:
If you are at the console of the VSM and don’t have the ability to log the session output, you can save the tech-support file to the bootflash of the VSM and copy it off using one of the following: TFTP, SFTP, FTP, SCP:
show tech-support svs > bootflash:techsupport.log
dir bootflash:
copy bootflash:techsupport.log tftp://x.x.x.x
Several show commands can be run on the VEM, from the VSM, as long as the VEM is present in the VSMs configuration by running:
module vem <#> execute vemcmd <command>
Unfortunately, the command that is needed to collect the log bundle from the ESX/ESXi host cannot be run from the VSM – you will need to either SSH or console into the host itself. Once you are at the CLI prompt of your ESX host, the following command can be run to collect the VEM logs:
vem-support all or /usr/bin/vem-support all
This collects logs related to the VEM module running and its current configuration for troubleshooting from the VEM side. You will see the following output once the log bundle collection is complete:
Generated /tmp/cisco-svs-1203-2348.tgz
The log bundle is saved to the /tmp directory of the ESX host. In order to retrieve it from the server, you would need to either SFTP or SCP it to a remote server, or browse the datastore in vCenter and download the .tgz file.
Cisco's Nexus 1000v Troubleshooting Guides contain other helpfful commands that can be used for diagnosing the switch:
http://www.cisco.com/en/US/products/ps9902/prod_troubleshooting_guides_list.html