Home > Networking > Creating a Junos Olive in VMware

Creating a Junos Olive in VMware

The term  “Olive” is given to any virtual machine or PC based hardware platform that is running the Junos operating system on it. Juniper does not support these types of installations. Below is the walk through of how I got the Junos Olive created for my lab environment. You will need a copy of the FreeBSD 4.11 Mini Installation ISO image (available here)and a Junos software package. I’m using Junos 10.4R3.4 for the M/MX/T series routers. I will not provide the Junos image for download, you will need a valid J-Care contract to download the software from Juniper.

Create a virtual machine with the following settings (I’m using VMware Workstation).

  • 1 Processor
  • 512 MB Memory
  • CD-ROM Drive (for FreeBSD install)
  • Remove the USB Adapter & Sound Card
  • 8 GB Hard Drive (I used the default drive size)
  • Add as many network adapters as necessary (you can always add or remove network interfaces later)

Once you have created the virtual machine, edit the virtual machine configuration file (.vmx) file and make the following changes.

Change the below entry to FALSE

scsi0.present = "FALSE"

Make sure the network adapters are set to “e1000″

ethernet0.virtualDev = "e1000"

Next install FreeBSD 4.11 with the following settings:

  • Standard installation
  • FDisk – Use entire disk
  • BootMgr – default FreeBSD Boot Manager
  • Create the following partition structure:
    Part        Mount           Size
    -----     ---------        ------
    ad0s1a     /                512M
    ad0s1b     swap            1024M
    ad0s1e     /config           24M
    ad0s1f     /var          use rest of space
  • Average User install
  • Do not install the ports collection
  • Installation Media – CD/DVD
  • Choose Yes on the final warning message
  • Would you like to configure any Ethernet or SLIP/PPP network devices? Yes
  • Configure em0 with no IPv6 support and enable DHCP
  • Do you want this machine to function as a network gateway? No
  • Do you want to configure inetd and the network services that it provides? No
  • Do you want to have anonymous FTP access to this machine? No
  • Do you want to configure this machine as an NFS server? No
  • Do you want to select a default security profile for this host? No
  • Would you like to customize your system console settings? No
  • Would you like to set this machine’s time zone now? No
  • Would you like to enable Linux binary compatibility? No
  • Does this system have a non-USB mouse attached to it? No
  • Package collection – Would you like to browse the collection now? No
  • Any additional user accounts? No
  • Set the root password
  • Visit the general configuration menu for a chance to set any last options? No
  • Exit the installation and let the system reboot

Log into the virtual machine as root and place the jinstall-*-domestic-signed.tgz file in /var/tmp. Since this is not a Juniper device you will need to modify the contents of the package to get it to install on FreeBSD. Replace the asterisk’s in the jinstall file names with the version you downloaded.

  1. Create a jinstall directory and extract the contents of jinstall-*-domestic-signed.tgz into it.
    cd /var/tmp
    mkdir jinstall && tar -C jinstall -zxf jinstall-*-domestic-signed.tgz
  2. Edit the +INSTALL file in the jinstall directory and change the check_arch function to match below.
    vi -- +INSTALL
     
    check_arch_compatibility()
      {
        # re_name=`/sbin/sysctl -n hw.re.name 2>/dev/null`
        re_name="olive"
        if [ -z "$re_name" ]; then
            Error "hw.re.name sysctl not supported."
        fi
  3. Extract the contents of jinstall-*-domestic.tgz to /var/tmp/jinst-dom
    mkdir /var/tmp/jinst-dom && tar -C /var/tmp/jinst-dom -zxf jinstall-*-domestic.tgz
  4. Change directories to /var/tmp/jinst-dom and make the same change to both the +INSTALL and +REQUIRE files in this directory.
  5. Extract the contents of /var/tmp/jinst-dom/pkgtools.tgz and replace the program checkpic with /usr/bin/true.
    mkdir /var/tmp/pkgtools && tar -C /var/tmp/pkgtools -zxf pkgtools.tgz
    cp /usr/bin/true /var/tmp/pkgtools/bin/checkpic
  6. Change directory to the pkgtools directory and create a gzipped tar file of the contents. Then move the pkgtools.tgz file to /var/tmp/jinst-dom.
    tar czf pkgtools.tgz *
    mv pkgtools.tgz /var/tmp/jinst-dom/
  7. Change directory to the jinst-dom directory and create a gzipped tar file of the contents. Then move the jinstall-*-domestic.tgz to /var/tmp/jinstall.
    tar czf jinstall-*-domestic.tgz *
    mv jinstall-*-domestic.tgz /var/tmp/jinstall/
  8. Change directory to /var/tmp/jinstall. Before creating the tar file you will need to delete the signature files as the check-sums will no longer match.
    rm -f *.md5 *.sha1 *.sig
    tar czf /var/tmp/jinstall-*-olive.tgz *
  9. Install the package we just created with pkg_add. You will receive some warning messages which are to be expected.
    pkg_add jinstall-*-olive.tgz

Once the install is completed reboot the virtual machine, after a few minutes you should be presented a login prompt. The default username is root and there is no password. At this time you are now able to type ‘cli’ and enter the Junos command line. Now you can copy this virtual machine to create the number of Olive’s you need for your lab.

Categories: Networking Tags: ,
  1. ashish
    August 26th, 2011 at 10:45 | #1

    hi..thanks for the note here..I followed it however I am still facing an issue..when I add the package it gives an error as below.

    ERROR: hw.re.name sysctl not supported.
    pkg_add: package /var/tmp/instmp.lpp5d2/jinstall-11.2R1.10-domestic-tgz fails requirements – not installed.

    pkg_add: install script returned error status

    Any ideas whats going on error. Errors are not very descriptive so I am not able to figure out what requirements are missing.

  2. August 28th, 2011 at 19:12 | #2

    @ashish
    I haven’t tried installing 11.2 in an Olive yet. Which package did you download? I know that the EX and SRX packages will fail to install as an Olive.

  3. Robert B. Harris
    November 4th, 2011 at 11:10 | #3

    Ashish,

    I have found that several other things need to be done, at least in more recent versions of jinstall.

    There are several things I replaced in both +INSTALL and +REQUIRE to get jinstall-11.2r1.10-domestic. Now that I got it to work, I’m going to optimize my instructions and see what was needed to be changed. More to follow…

    -Robert B. Harris from VA

  4. Jay
    February 10th, 2012 at 16:28 | #4

    Hi,

    Any idea how to rename the interface from em0 to ge-0/0/0. I don’t mean rename command in junos which only copies the config from one interface to another, but actually renaming the interface so em0 becomes ge-0/0/0. Many thanks,

    Kind Regards,
    Jay

  5. February 10th, 2012 at 17:19 | #5

    Jay,

    I believe that renaming the interface to the common interface naming convention you are use to isn’t possible. Mostly because this is a limitation of emulating the Junos environment (Olive has no concept of ASIC design).

    Breaking down the example interface name of ge-0/0/0 it equates to type-fpc / pic / port
    For more info on Interface names see: http://www.juniper.net/techpubs/en_US/junos9.4/topics/concept/interfaces-naming-conventions.html

    Hope this helps.

  1. No trackbacks yet.