Cisco IOS XRv in GNS3 using VirtualBox

Icisco-logo-transparent-backgroundf you are studying for your CCNA SP exam, or work with IOS XR and would like to learn more about the way IOS XR works you can now install IOS XRv in VirtualBox and integrate it with GNS3 version 1.1. In the following post I will describe the steps of setting up VirtualBox and GNS3 version 1.1 to use IOS XRv on Ubuntu 14.0.4.

Download the IOS XRv Image

First we need to get the Virtual Machine image from the Cisco Website. Note, you will need to have a Cisco CCO login to download the demo image.

File Exchange - Cisco Systems - Chromium_037

Download the .ova version of your prefered release, I have tested iosxrv-k9-demo-5.2.0 and the iosxrv-k9-demo-5.1.3. Once you select the version you want to download you will be redirected to the software licence, accept the terms and the download will begin.

Create the IOS XRv VM

Once you have downloaded the software you will need to import the ova into VirtualBox.

  • Select File -> Import Appliance from the toolbar menu:

Oracle VM VirtualBox Manager_039

  • Click on the File icon and select the .ova image you just downloaded.
  • Click Next:

Import Virtual Appliance_040

  • Change the values of the number of CPU’s and the amount of RAM used for the VM to suite you system, remove the DVD from the VM as it will not be used.
  • Click Import.

Import Virtual Appliance_043

Once you have clicked Import, the IOS XRv VM will show up in your list of Virtual Machines:

Oracle VM VirtualBox Manager_044

Configure the IOS XRv VM

Now that we have an IOS XRv VM, we need to modify some of the settings so that it will run correctly ing GNS3.

  • Right click on the IOS XRv VM and click settings:

Oracle VM VirtualBox Manager_046

  • Under the System menu remove the floppy and CD/DVD from the boot order:

xrv_2 - Settings_047

  • Under the Network menu select Enable Network Adapter for each interface you want to use in GNS3.
  • Select Host Only Adapter for each interface you want to use in GNS3.

xrv_2 - Settings_049

  • Select the Serial Ports menu.
  • Select Enable Serial Port
  • Select COM1
  • Select Host Pipe as the Port Mode
  • Set the port part using /tmp/pipe_<image_name>

xrv_2 - Settings_050

Add IOS XRv VM to GNS3

Next we need to add the IOS XRv VM to GNS3.

  • Select Edit -> Preferences from the toolbar menu

test.gns3- — GNS3_055

  • Select VirtualBox VM’s Preferences from the menu on the right hand side,
  • Click New:


  • Select the IOS XRv VM from the dropdown menu:
  • Click Finish:

New VirtualBox VM_057

  • Select the IOS XRv VM and click edit:


  • Under the General Settings enable Start VM in Headless mode:

VirtualBox VM configuration_059

  • Select the number of Network Adapters to use for the VM.
  • Click ok

VirtualBox VM configuration_060

Install socat

In order to console into the IOS XRv VM from Ubuntu using gnome terminal we must first install socat, which is a command line based utility that establishes two bidirectional byte streams and transfers data between them.

Run IOS XRv in GNS3

Now you will be able to drag you IOS XRv VM into your GNS3 work space and connect it to other IOU and dynamips devices.

If you start up the IOS XRv VM and you only see a null interface when running “show interface summary”, stop the device in GNS3 and check that all the interfaces are set to host only in VirtualBox before starting the device again (this is a know issue).

Another know issue is that if at first you can not ping the remote interface from the IOS XRv VM you need to delete the link and re add it and everything should be able to work. Also sometimes the interface numbering is a bit out so you may have to delete the link and add it on another interface, for example the test bellow had inter gig 0/0/0/0 on interface eth2 on the VM, so it takes a bit of trial and error to get everything up and running.

test.gns3- — GNS3_062



7 thoughts on “Cisco IOS XRv in GNS3 using VirtualBox”

  1. I installed VB on Centos 6.5 and set the IOS xrv’s interfaces to be connected to host-only interface, but after each boot all the interfaces’ status change to ‘ not connected’ in the VB configuration. any idea ?


    1. What happens if you add the VM to a topology in GNS3 and connect the links to another router and start the VM? On my Ubuntu install the links that are connected change to generic interfaces on the VM when it boots.

  2. yeah, and that is the key, GNS3 controls the number of XR interfaces, when I add or remove interfaces on GNS3, VM on VB changes respectively.
    And like you said XR interface needs to be connected to another device to appear as connected.
    and g0/0/0/0 port by default configured for management port. so I start my links from g0/0/0/1.
    The only issue I am still seeing is the connectivity between nodes, which I have to remove the links between XR and other nodes and add them again on GNS3 GUI each time I reboot XR.

    1. Unfortunately that is a known bug in IOSXRv running on VBox. I usually just shut the interfaces on both sides then delete the link and add it again. I then bring the links back up, this seems to work for me.

  3. I’m having some issues getting my IOS-XRv just correctly running on Win8.1 with GNS3 1.2.1, Virtual Box 4.3.20. I get everything to the point where the XRv needs to start running, but all I get is “Booting ‘IOS XRv’. Nothing else. Any ideas? I’ve tried different version of the XRv, and a bunch of different configuration sets in VBox.

  4. Hi:

    I’ve tried many things to put the Serial Port to work in Ubuntu but it’s been impossible. I’ve played with permissions, I’ve added my user to the dialout group and many other things but nothing helped.

    It is supposed that after I set up the XRv router, I must be able to open a serial connection (screen, putty, etc.) to COM1 or /temp/something ?

    Thanks in advance for any help.

Leave a Reply