cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
62402
Views
0
Helpful
17
Comments
kego
Level 1
Level 1

Big Thanks to Lim Fung for this collaborative effort.

 

Important: This document is intended as a quick start guide and is NOT an official document for what is officially supported. The demo version of IOS XRv is offered without support and can be run on top of any hypervisor. For information regarding supported hypervisor for simulation/production deployment, please refer to the official Release Notes.

 

 

Running Cisco IOS XRv on QEMU/KVM 1.0

 

Minimal steps to install QEMU/KVM 1.0 on Linux Ubuntu Server 12.04.LTS (x86_64)

 

  1. Perform a minimal install of Ubuntu Server 12.04.LTS (x86_64)
  2. Install essential software components             
    • apt-get install qemu-kvm; modprobe kvm;
    • apt-get install uml-utilities (required for tap interface for bridge to physical interface)
  3. Ensure that VT-x flag (or equivalent) is exposed to operating system.
    • egrep -c '(vmx|svm)' /proc/cpuinfo
  4. Ensure that current user is added to 'kvm' group
    • sudo addgroup `id -un` kvm (re-login for group changes to take effect)

 

 

Assuming you already have a working QEMU/KVM environment, spinning up a VM with Cisco IOS XRv on QEMU/KVM is simple and straightforward.

 

  1. Download IOS XRv VMDK file from Cisco.com. (e.g. iosxrv-demo-5.1.1.vmdk)
  2. Make a copy of the VMDK file for each IOS XRv VM, either
    • cp iosxrv-demo-5.1.1.vmdk xrv-1.vmdk; cp iosxrv-demo-5.1.1.vmdk xrv-2.vmdk
    • qemu-img create -f qcow2 -b iosxrv-demo-5.1.1.vmdk xrvr-1.qcow2; qemu-img create -f qcow2 -b iosxrv-demo-5.1.1.vmdk xrvr-2.qcow2*
  3. In the example below, we are using xrv-1.vmdk and xrv-2.vmdk
  4. Determine what memory you want to allocate to each VM (min 3GB - max 8GB). Configure it using the -m flag.
  5. Configure the connections between the two IOS XRv VM using the -net flag. Make sure one side is set to ‘listen’ and the other is set to ‘connect’.(Note: The first NIC will show up as MgmtEth0/0/CPU0 and the succeeding NICs will show us as GigabitEthernet0/0/0/0, GigabitEthernet0/0/0/1 and so on)
  6. Access the IOS XRv VMs by using telnet to the port specified in the configuration. (e.g. telnet localhost 9101)
  7. Wait for the IOS XRv to boot up.
  8. Login and start configuring! (Scroll down below for link to Introduction to Cisco IOS XR Technical Workbook)

 

*This allows you to leverage on the QEMU Copy-On-Write (COW) feature.

 

As an illustration, two Cisco IOS XRv VMs are created and connected back-to-back.

 

  • First VM uses 3GB of memory and xrv-1.vmdk for the disk.

 

  • Second VM uses 3GB of memory and xrv-2.vmdk for the disk.

 

Screen Shot 2014-02-05 at 11.11.58 PM.png

 

Connecting IOS XRv to External Devices

 

Screen Shot 2014-02-06 at 1.32.31 AM.png

 

Using more than 8 NICs in QEMU/KVM 1.0

 

QEMU/KVM 1.0 by default does not allow more than 8 NICs to be attached to a virtual machine. In order to remove this limitation, editing the header files and compiling the package from source is required. Below are the steps that are required to achieve this.

 

1. apt-get source qemu-kvm

2. cd qemu-kvm-1.0+noroms

3. edit net.h using your favourite editor (vi) and look for the line that says

 

/* NIC info */

 

#define MAX_NICS 8

 

4. Change the value of MAX_NICS to something larger, e.g. 16.

5. Save changes and quit editor.

6. Prepare your build environment, i.e.

  • apt-get install build-essential
  • apt-get --no-install-recommends -y build-dep qemu-kvm
  • dpkg-buildpackage -us -uc -nc

7. After the build completes you will have qemu-kvm_1.0+noroms-0ubuntu14.13_amd64.deb in the parent directory.

8. If you already have kvm installed, remove it.

  • apt-get --purge remove qemu-kvm

9. To install and use the newly compile qemu-kvm package, do (in the parent directory)

  • dpkg -i qemu-kvm_1.0+noroms-0ubuntu14.13_amd64.deb

 

Running Cisco IOS XRv on ESXi 5.x

 

This installation guide is broken down into 5 sections:

  1. Uploading the IOS XRv VMDK file to the ESXi Datastore
  2. Creating a new VM and using the IOS XRv VMDK as the existing virtual disk
  3. Adding Serial Ports to the VM for Console and (optional) AUX ports
  4. Modifying Firewall Settings to allow connection to Serial Ports
  5. Accessing the IOS XRv VM

 

Section 1: Uploading the IOS XRv VMDK file to the ESXi Datastore

 

  1. Download IOS XRv VMDK file from Cisco.com. (e.g. iosxrv-demo-5.1.1.vmdk)
  2. Upload the IOS XRv VMDK file to the ESXi Datastore. (Click on the ESXi Host -> Configuration -> Storage -> [Right-Click] Browse Datastore)

 

 

Untitled2.png

 

3. Create a directory for the VMDK file.. (Tip: Use the same name that you would use for the VM)

4. Click the Upload button and browse for the VMDK file.

 

Untitled3.png

 

5. Close the dialog box when upload is done.

 

Section 2: Creating a new VM and using the IOS XRv VMDK as the existing virtual disk

 

 

Untitled4.png

 

 

Untitled5.png

 

 

 

 

Untitled6.png

 

 

Untitled7.png

 

 

 

 

Untitled8.png

 

 

 

Untitled9.png

 

 

 

Untitled10.png

 

  1. Create a new virtual machine. ([Right-Click] on ESXi Host) or (File -> New -> Virtual Machine)
  2. Select Custom for Configuration Type. This will give you the option to configure CPU, Memory, etc upfront. Click Next.
  3. Type in the name you want for this VM. Click Next.
  4. Select the datastore you would want this VM to use. Click Next.
  5. For Virtual Machine version, select Version 8. Click Next.
  6. For Guest Operating System, select Other and specifically “Other (32-bit)” from the drag down option. Click Next.
  7. Configure the vCPU. (min 1 core)
  8. Configure memory size or vRAM. (min 3GB and max 8GB)
  9. You can select up to 4 NICs on this step. You can add more NICs later. Make sure to change the adapter type to E1000 for ALL NICs. Click Next.

     

    (Note: The first NIC will show up as MgmtEth0/0/CPU0 and the succeeding NICs will show us as GigabitEthernet0/0/0/0, GigabitEthernet0/0/0/1 and so on)
  10. Use default value for SCSI Controller Settings. Click Next.
  11. For the Disk Option, select the option “Use an existing virtual disk”. Click Next
  12. Browse for the IOS XRv VMDK File. Click Next.
  13. Leave the options as default. Click Next.
  14. Summary Page. Click Finish.

 

Section 3: Adding Serial Ports to the VM for Console and (optional) AUX ports

(Note: VMware may require license to add serial ports)

 

 

 

Untitled11.png

 

 

 

Untitled12.png

 

 

Untitled13.png

 

 

  1. On the left navigation pane, right-click on the newly created IOS XRv VM and select “Edit Settings”. This will bring up the VM Properties dialog box.
  2. Under the Hardware tab, click Add.
  3. Select Serial Port. Click Next.
  4. Select “Connect via Network” for Serial Port Output. Click Next.
  5. Under Network Backing, select “Server” instead of “Client”. Type in “telnet://<esxi_host_ip>:<port_number>” under Port URI. Leave the other options as is. Click Next.
  6. Click Finish.
  7. (OPTIONAL) Repeat the procedure to add a second serial port.

    Note: The first serial port added to the VM will be the Console port and the second serial port will be for the Aux port.

 

Section 4: Modifying Firewall Settings to allow connection to Serial Ports

 

 

 

Untitled14.png

 

  1. On the left navigation pane, click on the ESXi Host. Click on the Configuration Tab. Under Software, click Security Profile.
  2. Under Firewall, Click on Properties.
  3. Scroll through the list and search for “VM serial port connected over network”. Enable it by clicking on the checkbox. Click OK.

 

Untitled15.png

 

Section 5: Accessing the IOS XRv VM

 

 

 

 

  1. Telnet (from any telnet client) to the IOS XRv VM with the telnet URL created in Section 3. (e.g. telnet 172.20.169.2 6001)
  2. It will go through the TURBOBOOT process the first time it boots up and will reload once TURBOBOOT is complete. This only happens once, only during the first bootup.
  3. Create Username and Password when prompted.
  4. Login and start configuring! (Scroll down below for link to Introduction to Cisco IOS XR Technical Workbook)

 

Sample Output of the bootup process

 

 

Untitled16.png

 

Quick Start Lab Guide: Introduction to Cisco IOS XR Technical Workbook

 

New to Cisco IOS XR? Follow the link below to get started!

https://supportforums.cisco.com/docs/DOC-39962

 

See also:

 

Running IOS XRv on VMware Fusion/Workstation

https://supportforums.cisco.com/docs/DOC-40163

Comments

After some testing using qemu and tap/sockets interfaces i was able to connect two instances of IOS-XRv with Dynamips instances, Junos Olive instances and my host laptop adapters. Basic routing protocols (IGP and BGP) and MPLS seem to work without issues. Haven't managed to establish EoMPLS features (L2 VPNs P2P/VPLS) and there is a lack of 802.1q support ( i suppose that they aren't supported in the DEMO version along with other features as well). I guess that is in accordance with the supported features described on the link:

http://www.cisco.com/c/en/us/td/docs/ios_xr_sw/ios_xrv/install_config/b-xrv/b-xrv_chapter_01.html#concept_0DDEFF1A475249F2B3DBB4EC8F744EA4

However in the release notes :

http://www.cisco.com/en/US/partner/docs/ios_xr_sw/iosxr_r5.1/general/release/notes/reln-xrv.html

three different falvors are described (DEMO, Simulation, Production). Will there be any different approach in terms of supported features for the Simulation or Production versions ?

glmatthe
Cisco Employee
Cisco Employee

Great document! Two quick notes:

1) Under "Section 3: Adding Serial Ports to the VM for Console and (optional) AUX ports", step 5, can you add a note indicating that you must specify a telnet:// URI for the port. If you leave off the telnet:// and just specify an IP address and port, the port will be TCP-backed instead of telnet-backed and users will see many incorrect behaviors when connecting to the port.

2) Under "Section 5: Accessing the IOS XRv VM", step 2 (TURBOBOOT) should be removed as the released images are pre-turbobooted.

Thanks!

Glenn

flim
Cisco Employee
Cisco Employee

Done! Thanks for the feedback!

flim
Cisco Employee
Cisco Employee

The supported features are the same across the different flavors of IOS XRv.


ghellai ferhat
Level 1
Level 1

Does IOS XRv work for just one day?

I did every thing correctly yesterday and it worked perfectly for one day, when trying to get access today, the telnet session doesn't work, I checked the firewall setting every thing is correct, I can't access to all my routers, I changed the ports unchecked and checked again the serial port in firewall setting but nothing, I can get telnet access to my modem but not to my XRv routers did this happen to any one else or just me?

kego
Level 1
Level 1

No, there's no limit on how long you can use IOS XRv for. Are you running this on ESXi or QEMU/KVM? If you haven't closed the previous telnet connection properly, this connection can be blocked the next time you try to connect. In my experience, on ESXi, it gives you an error message but on QEMU/KVM, it only gives you a blank screen.

ghellai ferhat
Level 1
Level 1

Thank's for your answer, Im using it on ESXi 5.5

I realy don't remember if I closed the tenet correctly, the truth is I don't even know how properly close a telnet session, I think the only option i got is reinstall the whole ESXi and the XRv routers and restart again, is there another option?

ghellai ferhat
Level 1
Level 1

I fixed it by reseting the ESXi, creating a new XRv RTR and reconfigure firewall setting.

Thank you

Thank you for your response.

azher.amin
Level 1
Level 1

I am trying the KVM setup on RHEL 7.0, but so far unsuccessful. Below is my script for two routers, do you see issues ? Routers load successfully and I can see the MAC addresses and can do all the configs. However ping does not work, neither lldp.

[root@qemu-iosxrv xrv]# more start-tap.sh
/usr/libexec/qemu-kvm \
-daemonize \
-m 3072 \
-hda xrvr-1.qcow2 \
-serial telnet::9101,server,nowait \
-net tap,ifname=tap0,vlan=1,script=no,downscript=no \
-net nic,model=e1000,vlan=1,macaddr=00:01:00:ff:01:00 \
-net tap,ifname=tap1,vlan=2,script=no,downscript=no \
-net nic,model=e1000,vlan=2,macaddr=00:01:00:ff:01:01 \
-net tap,ifname=tap2,vlan=3,script=no,downscript=no \
-net nic,model=e1000,vlan=3,macaddr=00:01:00:ff:01:02 \
-net tap,ifname=tap3,vlan=4,script=no,downscript=no \
-net nic,model=e1000,vlan=4,macaddr=00:01:00:ff:01:03

/usr/libexec/qemu-kvm \
-daemonize \
-m 3072 \
-hda xrvr-2.qcow2 \
-serial telnet::9102,server,nowait \
-net tap,ifname=tap4,vlan=1,script=no,downscript=no \
-net nic,model=e1000,vlan=1,macaddr=00:01:00:ff:02:00 \
-net tap,ifname=tap5,vlan=2,script=no,downscript=no \
-net nic,model=e1000,vlan=2,macaddr=00:01:00:ff:02:01 \
-net tap,ifname=tap6,vlan=3,script=no,downscript=no \
-net nic,model=e1000,vlan=3,macaddr=00:01:00:ff:02:02 \
-net tap,ifname=tap7,vlan=4,script=no,downscript=no \
-net nic,model=e1000,vlan=4,macaddr=00:01:00:ff:02:03

brctl addbr br0
brctl addbr br1
brctl addbr br2
brctl addbr br3

brctl addif br0 tap0
brctl addif br0 tap4
brctl addif br1 tap1
brctl addif br1 tap5
brctl addif br2 tap2
brctl addif br2 tap6
brctl addif br3 tap3
brctl addif br3 tap7

[root@qemu-iosxrv xrv]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.268a467f1dec       no              tap0
                                                        tap4
br1             8000.66ede4392c30       no              tap1
                                                        tap5
br2             8000.12d0602c275f       no              tap2
                                                        tap6
br3             8000.42fae186c721       no              tap3
                                                        tap7

[root@qemu-iosxrv xrv]# brctl showmacs br0
port no mac addr                is local?       ageing timer
  1     26:8a:46:7f:1d:ec       yes                0.00
  2     d2:25:9d:64:b2:75       yes                0.00
[root@qemu-iosxrv xrv]# brctl showmacs br1
port no mac addr                is local?       ageing timer
  2     66:ed:e4:39:2c:30       yes                0.00
  1     8e:30:c5:9b:89:42       yes                0.00

One of the MAC here is for the bridge, while I don't know from where the second MAC is coming. Also the MAC address of router interfaces as assigned above in kvm are not listed in showmac output ?

 

Thanks

-Azher

 

 

flim
Cisco Employee
Cisco Employee

Check that the tap interfaces are up, if not you may have to plumb it manually :-) HTH.

azher.amin
Level 1
Level 1

Yes that was the problem :) Its working fine now and I see MAC addresses from different routers.

Thanks
-Azher

azher.amin
Level 1
Level 1

Is there a news when the next release 5.1.3 will be available for download ?

Thanks

 

kego
Level 1
Level 1

I don't know the exact timeline but please check back within this week.

payne9446
Level 1
Level 1

kego,

I followed your steps for IOS XRv on ESXI meticulously but get connection failed using SecureCRT. I performed all steps to the letter.

ESXI 5.5

IOS XRv 5.2.2

port 6001

Seems pretty straight forward from your instructions. Any ideas?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links