Upload
reno51
View
566
Download
2
Embed Size (px)
Citation preview
Brezular's Technical Blog
My worthless personal blog about networking
Cisco CSR 1000v Installation on QemuVirtual Machine
AUGUST 18, 2013 5 COMMENTS(HTTP://BREZULAR.WORDPRESS.COM/2013/08/18/CISCOCSR1000VINSTALLATIONONQEMUVIRTUALMACHINE/#COMMENTS)
The Cisco IOS XE Release 3.10 (http://software.cisco.com/download/release.html?mdfid=284364978&flowid=39582&softwareid=282046477&release=3.9.1S&relind=AVAILABLE&rellifecycle=ED&reltype=latest)brings support(http://www.cisco.com/en/US/docs/routers/csr1000/software/configuration/csr1000vswcfg.pdf) for KernelBased Virtual Machine (KVM (http://www.linuxkvm.org/page/Main_Page)) hypervisor(http://en.wikipedia.org/wiki/Hypervisor). Thanks to the this awesome enhancement, Cisco CSR 1000vrunning IOS XE 3.10 can be easily connected to devices running inside GNS3 (http://www.gns3.net/)topology. The goal of this tutorial is to install CSR 1000v IOS XE 3.10 on a virtual machine that is run byQemu (http://wiki.qemu.org/Main_Page) hypervisor. As the both Guest(http://searchservervirtualization.techtarget.com/tip/HostandguestvirtualmachineDefinitions) and Host(http://searchservervirtualization.techtarget.com/tip/HostandguestvirtualmachineDefinitions)CPU arethe same x86 architecture, Qemu can use kvm for hardware assisted virtualization. In a last part of thetutorial we will configure GNS3 to support CSR 1000v Qemu Virtual machine and test connectionbetween CSR 1000v and Cisco 3725(http://www.cisco.com/en/US/prod/collateral/routers/ps282/product_data_sheet09186a008009203f.html) both running inside GNS3.
REQUIREMENTS
1. Hardware Requirements
Computer with at least 6 GB RAMEach CSR 1000v Virtual machine consumes 4 GB RAM plus 2 GB RAM for OS and installedapplications e.g. GNS3, DynamipsProcessor with builtin hardware virtualization (http://en.wikipedia.org/wiki/Hardwareassisted_virtualization)support (VTx(http://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_.28VTx.29) or AMDV(http://en.wikipedia.org/wiki/X86_virtualization#AMD_virtualization_.28AMDV.29))
2. Software Requirements
Linux Fedora 17 x8664 (or any other x86 or x8664 Linux) with working KVM and Qemuinstallation KVM installation (http://brezular.wordpress.com/2012/11/07/%EF%BB%BFkvminstallationonfedora/)on Fedora Linux Qemu installation (http://brezular.wordpress.com/2012/02/12/installationsolarissparc26sunos56onqemupart1qemuinstallation/) on Fedora LinuxGNS3 0.8.4 configured for Qemu and Dynamips hypervisor supportDynamips installation (http://brezular.wordpress.com/2011/03/14/dynamips028rc3installationfromsourceonlinuxfedora/) on Fedora Linux Qemu 1.6.0 compiled for i386 support (Qemu 0.12 is oficially supported in a CSR 1000v software configuration guide(http://www.cisco.com/en/US/docs/routers/csr1000/software/configuration/csr1000Vswcfg.html)) Dynamips 0.2.8RC7x86_64.bin CSR 1000v IOS XE Release 3.10.0S Download Page(http://software.cisco.com/download/release.html?mdfid=284364978&flowid=39582&softwareid=282046477&release=3.9.1S&relind=AVAILABLE&rellifecycle=ED&reltype=latest)
Cisco CSR 1000v Installation on Qemu Virtual Machine
1. Create Qemu Virtual Machine
/usr/local/bin/qemuimg create f qcow2 ./CSR_1000v.img 8G
2. Start Qemu Virtual Machine
/usr/local/bin/qemusystemi386 boot d CSR_1000v.img enablekvm m 4096M cpu Nehalem smp4,sockets=4,cores=1,threads=1 device virtionetpci,mac=00:00:ab:c1:bd:02 device virtionetpci,mac=00:00:ab:2c:41:03 cdrom ~/csr1000vuniversalk9.03.10.00.S.1533.Sext.iso
The command start a Qemu Virtual machine with attached CSR installation ISO image. Qemu 32 bitbinary may be used to run a Virtual machine but CPU model Nehalem must be explicitly configured. Alsobe aware of RAM requirement. If less than RAM 4096 MB is assigned to a Virtual machine, installationfails. Finally, CSR 1000v IOS XE Release 3.10 only supports virtionetpci NIC model for kvmhypervisor.
(http://brezular.files.wordpress.com/2013/08/picture1.jpeg)
Picture 1 – CSR 1000v Boot Window
CSR 1000v is installed automatically. Once finished, it will restart and finally the router prompt appears.
(http://brezular.files.wordpress.com/2013/08/picture21.jpeg)
Picture 2 – Prompt Window
3. After Install Tasks – License Activation and Direct IOS output to a Serial Port
Cisco CSR 1000v license model and benefits of activation an evaluation license is explained here(https://brezular.wordpress.com/2013/08/11/managingciscocsr1000vinstalledonvmwareplayer/) inmore details. To activate evaluation license, us the following command:
CSR_1000v(config)#license boot level premium
Save configuration and reboot a router with the reload command. In order to direct IOS output to serialport use the following command:
CSR_1000v(config)#platform console serial
Save configuration with the write command:
CSR_1000v(config)#do write
GNS3 Qemu Guest Virtual Machine Configuration
Navigate to Edit> Preferences> Qemu> General Settings. Assuming that you Qemu installation isworking configure GNS3 Qemu settings as following:
(http://brezular.files.wordpress.com/2013/08/picture4.jpeg)
Picture 3 – Qemu General Settings
Click on the Test button to check if you configured Qemu General settings properly. If yes, GNS3 willshow the message All components have successfully started.
Navigate to Edit> Preferences> Qemu> Qemu Guest and configure your Qemu guest settings asfollowing.
(http://brezular.files.wordpress.com/2013/08/picture3.jpeg)
Picture 4 – Qemu Guest Settings
Testing Connection between Cisco CSR 1000v and 3725routers
Drag and drop both routers on the GSN3 desktop. Start routers and configure them according the networkdiagram.
(http://brezular.files.wordpress.com/2013/08/picture510.jpeg)
Picture 5 – Network Topology
Be aware that CSR 1000v reserves interface GigabitEthernet 0 for management purpose so use interfaceGigabitEthernet 1 instead for connection to the Cisco 3725 router. As we previously configured CSR1000v to direct IOS output to serial port, you can use the serial console. Right click on the device andselect option Console.
1. Configure the Hostname, CDP Protocol and the IP Address for the Interface GigabitEthernet 1of the Cisco CSR 1000v
Router>enableRouter#conf tRouter(config)#hostname CSR_1000vCSR_1000v(config)#cdp runCSR_1000v(config)#interface GigabitEthernet 1CSR_1000v(configif)#ip address 10.10.10.2 255.255.255.252CSR_1000v(configif)#cdp enableCSR_1000v(configif)#no shutdownCSR_1000v(configif)#do write
2. Configure the Hostname and the IP Address for the Interface FastEthernet 0/0 of the Cisco 3725Router
Router>enableRouter#conf tRouter(config)#hostname c3725c3725(config)#interface FastEthernet 0/0c3725(configif)#ip address 10.10.10.1 255.255.255.252c3725(configif)#no shutdownc3725(configif)#do write
3. Check if the Layer 2 and 3 Connection is Established between the Routers
If the Layer 2 connection is established between routers and CDP protocol is enabled on CSR 1000v, itshould appear in the output of show cdp neigbours command issed on the Cisco 3725. Similarly, if Layer 3connection is established between routers, we should be able to successfully ping ip address of CSR 1000vGigabitEthernet interface 10.10.10.2
(http://brezular.files.wordpress.com/2013/08/picture6.jpeg)
Picture 6 – Checking Connection between the Routers
FILED UNDER CSR 1000V TAGGED WITH 3.10.0S, CSR 1000V, GNS3, IOS XE, QEMU
About brezular"True freedom is an inner thing. It is a state of mind. It is a deliberate exercise of choice. Thus, if we thinkwe are bound by external forces, we are deceiving ourselves. It is our willing acquiescence to these outerdemands that imprisons. Free yourself today. Take control of your thoughts."
5 Responses to Cisco CSR 1000v Installation on QemuVirtual Machine
Pingback: Cisco CSR 1000v and VMware fusion howtos GNS3
Ozone007 says:September 27, 2013 at 9:19 amExcellent as Always
Replymaxim40 says:September 28, 2013 at 3:03 pmHi brezular,
I tried it on ubuntu 12.04 64bit but i when i tried to start virtual machine i had the following error. Itried everything with SDL with no success
No protocol specifiedNo protocol specifiedCould not initialize SDL(No available video device) – exitingis it possible to help me?
About these ads (http://en.wordpress.com/abouttheseads/)
Thank you
Replybrezular says:September 29, 2013 at 7:39 pmWhat is the exact command syntax you use to start your image?
Replymaxim40 says:September 30, 2013 at 9:01 pmHi brezular,
Now it is working without changing anything. I run again the command to send it to you and itis working.
Thank you very much
Blog at WordPress.com.
The Enterprise Theme.