This article explain how to make and install JunOS router using junos 12.3R6.6 olive package (.tgz) installed inside of a Qemu virtual machine running FreeBSD inside. All prepared under Win 7 64bit OS environments. Junos olive package is an original domestic Junos package modified running inside of Olive environment (inside of PC, not router HW).
The reason for making this tutorial is the usability of Qemu for running JunOS routers inside of the GNS3 network simulator.
Environment and Prerequisities
Here is the description of my working environment and software prerequisities
- Win 7 64 bit operating system.
- Installed Qemu. I'm using the one downloaded and installed together with the GNS3 of version 1.2.3.
- Created Qemu virtual machine with installed and running FreeBSD OS inside of it. The installation of FreeBSD using Qemu is described here (Installing FreeBSD for JunOS Olive using Qemu under Win 7 64bit). Unlike the mentioned tutorial the disk parameters have to be increased (up to 12 or 16G, and also changing partition sizes). If you follow the tutorial and you are making a fresh Freebsd machine at the end just for a backup reasons make a copy of the Qemu FreeBSd image (simply Ctrl-C and Ctrl-V inside of a folder where the machine have been created).
- Some JunOS image. You may download it somewhere on the net. It have to be Olive based, i.e. preprepared for running inside of PC (Olive in the sence is the codename given to JUNOS software running on an PC rather than a Juniper router). In this tutorial i'm using JunOS 12.3R7.6 olive.
- A free sFTP/SSH server for windows, for example the FreeSSHd server, Download here. The application is required for downloading junos tgz file from windows into qemu machine (many tutorials are using Linux as the base system, where there is no problem to run telnet/ssh/ftp/sftp server).
Making a qemu Freebsd machine
Here are brief steps taken and followed from the Installing FreeBSD for JunOS Olive using Qemu under Win 7 64bit tutorial:
1) create a machine
c:\Program Files\GNS3\qemu-2.1.0>qemu-img create -f qcow2 olive-base.img 16G Formatting 'olive-base.img', fmt=qcow2 size=17179869184 encryption=off cluster_s ize=65536 lazy_refcounts=off
2) Run nad install FreeBSd
qemu-system-x86_64w.exe -m 1G -hda olive-base.img -cdrom 4.11-RELEASE-i386-miniinst.iso \ -boot d -localtime
3) Make following disk partitions
ad0s1a / 4096M ad0s1b swap 4096M ad0s1e /config 256M ad0s1f /var rest (7935M)
4) finish the installation. Make a copy of fresh installed machine for other future use or for a recovery. And make one for next junos installation, I named it Junos-12.3R6.6.img
Boot the new machine with networking card enabled. Assign a little bit more RAM memory to speed up installation process:
qemu-system-x86_64w.exe -m 1G -hda Junos-12.3R6.6.img -boot /
c -localtime -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user
The window with the qemu machine will open and after booting process, log in using your root account and password (toor in ma case), which you have been setup during freeBsd installation. Now we need an IP address so type:
dhclient em0 ifconfig
ifconfig display that 10.0.2.15 IP address was assigned.
Now run inside of your Windows freeSSHd software, which is required to download junos olive package into freebsd qemu machine. Inside of freeSSHd software you need to have at least one account required for sucesfull login (root/toor in my case), and which point out sftp path to the folder, where you have placed junos olive tgz package file. Check if the service is running. (steps are described within Making qemu JunOS router installing JunOS 10.1 OLIVE package inside of qemu FreeBSD under Win 7 64bit tutorial)