You are on page 1of 13

Postings may contain unverified user-created content and change frequently.

The content is provided as-is and


is not warrantied by Cisco.
1
Running IOS XRv on ESXi and QEMU/KVM
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 on page 1
Connecting IOS XRv to External Devices on page 3
Using more than 8 NICs in QEMU/KVM 1.0 on page 4
Running Cisco IOS XRv on ESXi 5.x on page 5
Section 1: Uploading the IOS XRv VMDK file to the ESXi Datastore on page 6
Section 2: Creating a new VM and using the IOS XRv VMDK as the existing virtual disk on page
7
Section 3: Adding Serial Ports to the VM for Console and (optional) AUX ports on page 10
Section 4: Modifying Firewall Settings to allow connection to Serial Ports on page 11
Section 5: Accessing the IOS XRv VM on page 12
Sample Output of the bootup process on page 12
Quick Start Lab Guide: Introduction to Cisco IOS XR Technical Workbook on page 13

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)
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)
Ensure that VT-x flag (or equivalent) is exposed to operating system.
egrep -c '(vmx|svm)' /proc/cpuinfo
Ensure that current user is added to 'kvm' group
sudo addgroup `id -un` kvm (re-login for group changes to take effect)
Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
2


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)
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*
2. In the example below, we are using xrv-1.vmdk and xrv-2.vmdk
3. Determine what memory you want to allocate to each VM (min 3GB - max 8GB). Configure it using
the -m flag.
4. 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)
5. Access the IOS XRv VMs by using telnet to the port specified in the configuration. (e.g. telnet
localhost 9101)
6. Wait for the IOS XRv to boot up.
7. 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.

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
3

Connecting IOS XRv to External Devices

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
4

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 */

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
5
#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

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
6
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)



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.

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
7

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

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.
Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
8

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)

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
9

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.
Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
10

Section 3: Adding Serial Ports to the VM for Console and
(optional) AUX ports
(Note: VMware may require license to add serial ports)

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.

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
11

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

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.

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
12

3. Scroll through the list and search for VM serial port connected over network. Enable it
by clicking on the checkbox. Click OK.


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

Running IOS XRv on ESXi and QEMU/KVM
Postings may contain unverified user-created content and change frequently. The content is provided as-is and
is not warrantied by Cisco.
13

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

You might also like