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