Thursday, June 15, 2017

Running Cisco Nexus 7K Titanium in VM Workstation, VirtualBox and GNS3

I went to Mumbai India a month ago for an IT project and it was my second time in the country. I wasn't able to travel around during my first visit due to work load and limited time. After my project was done, I visited famous landmarks like the Gateway of India (a.k.a Taj Mahal of Mumbai) and the Taj Mahal Palace Hotel which is just on the opposite side. The Gateway of India was built to commemorate the landing of the British King and Queen when they visited India in 1911. There's a large inscription on top of the arch which reads, "Erected to commemorate the landing in India of their Imperial Majesties King George V and Queen Mary on the Second of December MCMXI."



I've been a GNS3 user since it was still Dynamips back in the mid 2000s. GNS3 became more powerful and it can run IOU Layer 2 switch, ASAv firewall, CSR1000v router and Nexus 7000 (N7K) switch. The Titanium is the VM flavor for Cisco Nexus switch. I tried searching for a Nexus OVF file so I can run it directly in VirtualBox but I ended up exporting the OVF file from VM Workstation.


Open the Titanium file (.vmx) in WMware Workstation (I used version 10) by going to File > Open > search for the .vmx.



Edit the N7K settings to add a new Serial Port (console) by clicking Edit virtual machine settings under the N7K tab.
 



Click Serial Port > Add > Next.
 


Leave the default settings > click Next > Finish.
 



Click on the new Serial Port 2 > choose Use name pipe: > type and take note \\.\pipe\N7K > click OK. This is the text or string will be used to connect via Serial on the terminal emulation program (PuTTy). Test and power on the Cisco Nexus switch VM by clicking on Play (green arrow icon).
 


Just click I copied it to continue with the boot up process.
 


Open PuTTy and type the Serial Port string: \\.\pipe\N7K



To login type: admin / cisco (obviously displayed in the login banner)
 


Once the Titanium VM is confirmed working, you can power off the VM by doing a right-click on the N7K tab > Power > Power off.



To export the VM file to OVF (for Virtual Box), click on File > Export to OVF > save the exported file to a location > wait for export to finish.
 




Open Virtual Box > click File > Import Appliance > choose the exported .ovf file > click Next.




Click Reinitialize the MAC address of all network cards > Import



It defaults to the name vm and to edit the VM settings, click on the VM name (vm) > click Settings (gear icon above). Under General > Basic > type the new Name for the VM.



Go to Serial Ports > Port 1 > tick Enable Serial Port > choose Port Mode: Host Pipe > type Path/Address: \\.\pipe\N7K > click OK. Take not do NOT tick Connect to existing pipe/socket as it will cause Virtual Box not to power ON the VM.



Power on the VM by doing a right-click on N7K > Start > Normal Start.




Virtual Box VM opens in PuTTy.



Virtual Box works seamlessly with GNS3 and to add the Nexus 7K VM in Virtual Box, open GNS3 and go to Edit > Preferences.



Go to VirtualBox > VirtualBox VM templates > New.



Click N7K (it will show other VM on the list > Finish.



Click Apply > OK.



To automatically open PuTTy for Nexus switch in GNS3, click on N7K > Edit > General Settings > tick Enable remote console and Start VM in headless mode > click OK > Apply > OK.

You can also tick Use as a linked base VM (experimental) to clone Nexus switch in GNS3 without manually cloning in VirtualBox,



Power off the N7K VM in VirtualBox. Close and open again GNS3 (a PC restart is also good). Drag the N7K icon > right-click > Start > Console.


I already got SecureCRT integrated with GNS3 and it automatically opens after clicking on Console. You can also change the symbol for the N7K to a multilayer switch. To add and connect more Nexus switches on the topology, just clone the N7K VM in VirtualBox and add it to GNS3.


The Nexus switch will display a syslog message saying Application license will shutdown in x days (count down started from 120 days).


You could enable an eval license (good for 120 days) with the license grace-period global command. This will allow you to play around with the Nexus advanced features (such as OSPF).