Thursday, September 10, 2015

Setup csr1000v on VirtualBox

Setup csr1000v on VirtualBox

For this router I had a lot of difficulties on determining the right setup so I can have all the functionality ( service instance, correct interface mapping to GNS3 ports ).

We will need:
    - GNS3 v1.3.10
    - Virtual Box 5.0.4 or latest
    - csr1000v image , you can download it from here

Note!!! csr1000v image comes in IOS format or OVA, if you can't download the ISO image but you can download the .ova , simply go with .ova file open the file with 7zip and extract the ISO image from it.

Step 1:  we need to build a blank VM, with the following parameters:
    - OS Type : Linux / Other Linux (64-bit)
    - System:
          - Memory : 4096 MB
          - Processors : 1vCPU
          - Acceleration :
                - Paravirtualization Interface : KVM
                - Hardware : VT-x/AMD-v - Nested Paging
     - Storage : 8GB - dynamic blank image
     - CD-ROM : select the csr1000v image
     - Network :
                 - Not attached
                 - Adapter Type: virtino-net
                 - Promiscuous Mode : Allow All
     - Serial:
                 - Port Mode : Host Pipe
                 - Path/Address : \\.\pipe\csr1000v

Step 2: Boot up the device , it will start installing the IOS-XE on the VM storage.

Step 3: Once the IOS-XE , boot the device and you will receive a prompt with "Router>". At this point the console is directed to the VGA, we need to make the console accessible from serial.

In the VM window , configure the router with the following commands :

     Router>enable
     Router#conf t
     Router(conf)#platform console serial
     Router(conf)#exit
     Router#copy run start
     Router#reload

Step 4: Power off and on the VM , and open a putty window. In Putty select Serial connection and in Serial line select "\\.\pipe\csr1000v"





Setup vMX on VirtualBox

Instructions for vMX on VirtualBox 4.3 and GNS3  1.3.7


The vMX is developed in several phases . For simulation purposes we will focus on the first phase were the RE and PFE are in the same VM . This phase is covered by the 14.1 version .

Note: for 14.1R4+ version there is a tweak used to make the FPC enable on the machine . The tweak is covered in details in here

The vMX VM uses only virtino-net adapters. Any attempt to use any other type of adapter will fail to put the fpc online .

The vMX uses the following NIC mapping , the first two NICs (em0 and em1) are assigned to management and fpx interface, the mapping of ge interface starting with ge-0/0/0 with em2 , ge-0/0/1 with em3 and so on.

Note : in case the fpc is not online , you can use the em2 .. interfaces as normal interfaces , but can't confirm if will run normally, all test done till now were on "ge" interfaces

To convert img to vmdk :
qemu-img convert -f qcow2 -O vmdk jinstall-vmx-14.1R1.10-domestic.img vMX.vmdk


Virtual Box Machine Definition:
- VM: Linux - Other Linux (32 bit)
- RAM : 1024 MB
- CPU : 1 / 2 core for 14.1R4+
- HDD: vMX.vdi / vMX.vmdk
- Adapter : 4 Paravirtualized Network , Allow All,not Attached
- Serial : Host Pipe , create Pipe, \\.\pipe\vMX_x

GNS3 :
- minimum 4 adapters
- adapters in Paravirtualized Network