Just finished, reinstalling my OS and was about to install GNS3 software. Found that the software now supports JUNOS through QMU. Hence I decided to try it out.
———————————————————————————————————————————————-
GNS3 0.7RC1
This is it, a new release of GNS3!
The main new feature is the integration of the Juniper router emulation using Qemu. Preparing a JUNOS image is not as straightforward as an IOS one and you will surely need to read the how to.
Others features are:
- Qemu integration.
- ASA integration using Qemu.
- An undo/redo framework (not fully debugged tough).
- Translations in Italian and Farsi (thanks to our contributors).
- Various bugs fixes and improvements.
I know many of you are very enthusiast but keep in mind this is a release candidate, so expect some bugs. (please, post your bugs report on the forum, under Development -> Bug reports).
Oncoming features and fixes can be found in the TODO file.
———————————————————————————————————————————————-
The article posted on GNS3 blog on October 29th, 2009 explains in detail how to run Junos inside GNS3
My sincere thanks to the author Jeremy Grossmann and the rest of the GNS team.
I have followed each step by step process and details mentioned.
Please visit the blog for more details.
The installation is on Windows. People with other OS are free to try.
http://blog.gns3.net/2009/10/olive-juniper/
Requirements (initial):
- GNS3 (used: GNS3 v0.7RC1 all-in-one)
- FreeBSD (used: FreeBSD 4.11 mini-inst ISO)
- Olive (used: jinstall-8.5R1.14-domestic-signed.tgz) don’t ask me how to get it.
- Qemu source code (used: Qemu 0.11.0)
-
First, compiling Qemu for GNS3 (support for Multicast):
Below are the steps for compiling qemu to emulate Olive in GNS3.You can be skip them by downloading the compiled version (qemu.exe).
- Install GNS3, winpcap will install with it. Install directory was set as C:\GNS3.
- Download and install MinGW . (choose custom installation with g++ and make included). I used MinGW-5.1.6.exe.
- Download MSYS and install it, answer yes to post-installation questions, the correct path to MinGW directory should be C:\MinGW. The file I downloaded was MSYS-1.0.11.exe.

- Download zlib, SDL, MSYS coreutils into your MSYS home directory (e.g. c:\Msys\public\username). I downloaded zlib-1.2.3.tar.gz, SDL-1.2.14.tar.gz and coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2. MSYS coreutils is necessary because Qemu signrom.sh uses tools such as dd, od, expr, cp and printf which are included in coreutils.
- Start MSYS. Compile and install zlib. Compile and install SDL. Install coreutils.

- Copy the content of coreutils-5.97-MSYS-1.0.11-snapshot in the MinGW directory (e.g. C:\MinGW). You can also compile and install wget in MSYS or simply use your preferred browser to download Qemu and the patch in the correct directories.
- Download Wincap Source file. Extract and copy the contents of \lib & \include in C:\MinGW\lib
& C:\MinGW\include. - Make install Qemu.

FreeBSD installation:
We are Installing Olive on Free BSD. Skip this step by downloading (olive-base.img) FreeBSD preinstall.
EDIT: Downloading olive-base.img(linux) will allow you to skip installation of Linux emulator as mentioned in part2.
- Copy FreeBSD 4.11 mini-inst ISO in Qemu directory. Create the image for installing FreeBSD. Run this command to create it and allocate 4 GB:
qemu-img create -f qcow2 olive-base.img 4G |
- Launch Qemu to install FreeBSD on the image:
qemu -m 256 -hda olive-base.img -cdrom 4.11-RELEASE-i386-miniinst.iso \ -boot d -localtime |
- Qemu window will pop up (remember, by default press CTRL + ALT to release the cursor in Qemu):

- Select Skip Kernel configuration and continue with installation press enter. Once Qemu has booted the FreeBSD Select Standard installation press enter.

- In the FDISK Partition Editor, press A to allocate the entire disk for FreeBSD and then Q to confirm.

- Select “install a standard MBR” and when you see the FreeBSD Disklabel editor.

- Press C to create the partitions in following order. Remember they have to be in order to work properly
ad0s1a / 1024M ad0s1b swap 1024M ad0s1e /config 12M ad0s1f /var rest |

- After creating partition press Q, Select distribution type as Average user.

- After choosing“User” distribution type, answer no for the question “Would you like to install the FreeBSD ports collection?”. Exit the menu and install from a FreeBSD CD/DVD.

- Once the files are copied, the installer asks user confirmation questions (Ethernet/SLIP config, gateway, inetd, FTP, NFS, security, console, linux compatibility, set time, etc). Answer no for each of them. You will also be asked to enter a root password, make sure you remember it. Kept root user password: password
- Now you should see the starting menu of the FreeBSD installer, exit by choosing X Exit Install. While FreeBSD CD is rebooting, quit Qemu by pressing Ctrl-Alt-2, then type: quit.

I will stop here. continue to my next post…

Great entry. I thank you posting that.
[...] visit my previous post for more details about patched Qemu and olive-base.img. [...]
Hi Sushant,
Thanks a lot for your effort.
Just to let you know i have been trying to compile Qemu on my Laptop and i have VISTA running on it. If i am not wrong i’ve invested approx 10 hours in compiling it but no luck.
Following are the steps i’ve followed….
cd
tar -xzvf zlib-1.2.4.tar.gz
cd zlib-1.2.4
./configure –prefix=/mingw
make
make install
Everytime i run its compiles for a bit then stops on MAKE INSTALL.
Then i tried following the second step….
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure –prefix=/mingw
make
make install
It also compiles for a bit then it stops again on MAKE INSTALL
I tried understanding the MAKE INSTALL error which is as follows
Nitin@NITIN-PC ~/zlib-1.2.4
$ make install
make: *** No rule to make target `libz.so’, needed by `install-libs’. Stop.
And i tried installing coreutils-8.4 but that also didnt change anything.
I am sure i’ve performed every step right …..
Now finally i tried reaching one of the moderators for help. I do remember i tried reaching out jermy as well since its really really urgent and important for me to emulate ASA and Juniper routers on my GNS….I’ve been performing certain scenarios on GNS with routing and switching but I really really need Firewalls and Juniper
I would love to hear from you soon.
Please if you can reach me on nitin_virmani@engineer.com
Hi Nitin,
Please provide me the error you got (pastebin link), also the procedures that you have performed in steps.
GNS3 has got its latest iteration now v0.7 which includes Qemu. If you are not a programmer then you should download this version.
Still there are some faults in it, you cannot run more than 1 Juniper router (issues with qemuwrapper) which I hope will get addressed soon.
Hello Sushant,
Many Many thanks for your reply!!!!!
Here are the following steps that followed.
First some dependencies must be installed, I chose to almost compile everything:
•Download MinGW and install it (choose custom installation with g++ and make included). The file I downloaded was MinGW-5.1.6.exe
•Download MSYS and install it, answer yes to post-installation questions and put the correct path to MinGW directory (should be C:\MinGW). The file I downloaded was MSYS-1.0.11.exe.
•Download , zlib, SDL, MSYS coreutils into your MSYS home directory (e.g. c:\Msys\public\username). I downloaded zlib-1.2.4.tar.gz, SDL-1.2.14.tar.gz and coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2. MSYS coreutils is necessary because Qemu signrom.sh uses tools such as dd, od, expr, cp and printf which are included in coreutils.
•Download and install Winpcap Developer Pack: extract the contents of \lib and \include folders into \lib and \include folders of your MinGW installation location (should be C:\MinGW\lib and C:\MinGW\include)
When i started compiling them as per the instructions
cd
tar -xzvf zlib-1.2.4.tar.gz
cd zlib-1.2.4
./configure –prefix=/mingw
make
It started to compile a bit but later on it stopped on MAKE INSTALL…I am pasting the output i get may be its too much for you but i just want to understand what exactly i was doing wrong.
Nitin@NITIN-PC ~
$ cd
Nitin@NITIN-PC ~
$ tar -xzvf zlib-1.2.4.tar.gz
tar (child): zlib-1.2.4.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
Nitin@NITIN-PC ~
$ cd zlib-1.2.4
Nitin@NITIN-PC ~/zlib-1.2.4
$ ./configure –prefix=/mingw
Checking for gcc…
Checking for shared library support…
Building shared library libz.so.1.2.4 with gcc.
Checking for off64_t… Yes.
Checking for fseeko… Yes.
Checking for unistd.h… Yes.
Checking whether to use vs[n]printf() or s[n]printf()… using vs[n]printf().
Checking for vsnprintf() in stdio.h… Yes.
Checking for return value of vsnprintf()… Yes.
Checking for errno.h… Yes.
Nitin@NITIN-PC ~/zlib-1.2.4
$ make
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o example.o example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o adler32.o adler32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o compress.o compress.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o crc32.o crc32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o deflate.o deflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzclose.o gzclose.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzlib.o gzlib.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzread.o gzread.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o gzwrite.o gzwrite.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o infback.o infback.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inffast.o inffast.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inflate.o inflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o inftrees.o inftrees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o trees.o trees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o uncompr.o uncompr.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o zutil.o zutil.c
ar rc libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o g
zwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o example example.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -c -o minigzip.o minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzip minigzip.o -L. libz.a
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/adler32.o adler32.c
adler32.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/compress.o compress.c
compress.c:1: warning: -fPIC ignored for target (all code is position independen
t)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/crc32.o crc32.c
crc32.c:1: warning: -fPIC ignored for target (all code is position independent)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/deflate.o deflate.c
deflate.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzclose.o gzclose.c
gzclose.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzlib.o gzlib.c
gzlib.c:1: warning: -fPIC ignored for target (all code is position independent)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzread.o gzread.c
gzread.c:1: warning: -fPIC ignored for target (all code is position independent)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzwrite.o gzwrite.c
gzwrite.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/infback.o infback.c
infback.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inffast.o inffast.c
inffast.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inflate.o inflate.c
inflate.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inftrees.o inftrees.c
inftrees.c:1: warning: -fPIC ignored for target (all code is position independen
t)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/trees.o trees.c
trees.c:1: warning: -fPIC ignored for target (all code is position independent)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/uncompr.o uncompr.c
uncompr.c:1: warning: -fPIC ignored for target (all code is position independent
)
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/zutil.o zutil.c
zutil.c:1: warning: -fPIC ignored for target (all code is position independent)
gcc -shared -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.4 adler32.lo compre
ss.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo in
ffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo -lc
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lc
collect2: ld returned 1 exit status
make: *** [libz.so.1.2.4] Error 1
Nitin@NITIN-PC ~/zlib-1.2.4
$ make install
make install
When i tried to run MAKE INSTALL i got the following error message.
Nitin@NITIN-PC ~/zlib-1.2.4
$ make install
make: *** No rule to make target `libz.so’, needed by `install-libs’. Stop.
•Compile and install SDL
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure –prefix=/mingw
make
make install
It also compiled similarly Zlib did and stopped on make install yesterday but the good news is when i tried to compile it today to send you the error message it finished succesfully.
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
/mingw/bin/install -c -m 644 build/libSDLmain.a /mingw/lib/libSDLmain.a
ranlib /mingw/lib/libSDLmain.a
/bin/sh build-scripts/mkinstalldirs /mingw/share/aclocal
mkdir -p — /mingw/share/aclocal
/mingw/bin/install -c -m 644 ./sdl.m4 /mingw/share/aclocal/sdl.m4
/bin/sh build-scripts/mkinstalldirs /mingw/lib/pkgconfig
/mingw/bin/install -c -m 644 sdl.pc /mingw/lib/pkgconfig
/bin/sh build-scripts/mkinstalldirs /mingw/share/man/man3
for src in ./docs/man3/*.3; do \
file=`echo $src | sed -e ‘s|^.*/||’`; \
/mingw/bin/install -c -m 644 $src /mingw/share/man/man3/$file; \
done
Nitin@NITIN-PC ~/SDL-1.2.14
$
•Install coreutils
Nitin@NITIN-PC ~/SDL-1.2.14
$ tar -xvjf coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
tar (child): coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2: Cannot open: No such f
ile or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
Nitin@NITIN-PC ~/SDL-1.2.14
$
I tried with lates COREUTILS 8.4 but that also gave me the same error message.
Nitin@NITIN-PC ~
$ tar -xvjf coreutils-8.4
tar (child): coreutils-8.4: Cannot read: Invalid request code
tar (child): At beginning of tape, quitting now
tar (child): Error is not recoverable: exiting now
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: error 0
Input file = (stdin), output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover’ program to attempt to recover
data from undamaged sections of corrupted files.
tar: Child returned status 2
tar: Error exit delayed from previous errors
Nitin@NITIN-PC ~
$
And i have copied everything /lib and /include in the home directory.
I also have Qemu-0.11 and staticly compiled Qemu but no help.
Are you talking about the GNS3 0.7 RC1??? If yes i already have that installed, request you to guide me how can i emulate ASAs and Juniper router in it..
Thanks in advance
Hey Sushant,,
I hope you are ok,
Yes I am
but I am not at my Home Town, came Pune for work and have limited internet access.
I will come to Mumbai in next week and will reply to you.
Till then you can download my compiled version.
Hi Nitin,
you are using “zlib-1.2.4.tar.gz” & “COREUTILS 8.4″ where as in my post i usid “zlib-1.2.3.tar.gz” & “coreutils-5.97-MSYS-1.0.11″ As mentioned by GNS3 Author.
The version of Mingw is not compatible with them.
Download them from here: http://www.4shared.com/dir/36595901/7ffc2aa1/qemu_compiles.html
“Are you talking about the GNS3 0.7 RC1??? If yes i already have that installed, request you to guide me how can i emulate ASAs and Juniper router in it..”
No it is GNS30.7 (post RC1). It now includes qemu inbuilt so there is no need to do any compilation and stuff. However you will only be able to run one Juniper router as it still has some bugs.
Hello Sushant,
I am sorry mate i’ve been away from internet for a while..busy with college assignments and all.
Let me try finding GNS30.7 as you mentioned and will try the above mentioned steps to compile as well.
Will get back to you tomorrow
[...] GNS3 0.7rc1 supports JUNOS… Lets try it out (Part 1) [...]
Administrator@OCCAF06C99 ~/zlib-1.2.3
$ ./configure –prefix=/mingw
Checking for gcc…
Building static library libz.a version 1.2.3 with cc.
Checking for unistd.h… No.
Checking whether to use vs[n]printf() or s[n]printf()… using s[n]printf()
Checking for snprintf() in stdio.h… No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()… No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h… No.
Checking for mmap support… No.
Administrator@OCCAMWAR-F06C99 ~/zlib-1.2.3
$ make
cc -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c
make: cc: Command not found
make: *** [example.o] Error 127
Administrator@OCF06C99 ~/zlib-1.2.3
$ make install
cc -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o adler32.o adler32.c
make: cc: Command not found
make: *** [adler32.o] Error 127
Administrator@OCCF06C99 ~/zlib-1.2.3
$
Can you tell me what I am doing wrong here? I am using 64 bit processor, does that make any difference? I appreciate any of your help.
Please check if you have extracted the tools properly. better yet there is a new version of GNS3 from the author’s site which installs qemu as well, so no need for compilation.
Thanks for response. I installed the newer version however little confused of not needing to compile. There is a Juniper router Icon however there is no option to add the image under hypervisiors simillar to Cisco routers, is there any thing I am missing out here.
This is an older post. I made it at the time when the author did not provide qemu with the Release candidate version.
now everything is included in the installer.
Hi, i have downloaded GNS3 v0.7RC1 all-in-one, before installing it do i have to follow any pre installation steps..suppose if i am downloading compiled Qemu , then is it required to install MinGW, Msys.
please guide me how to make JUNOS up in GNS3,
if u can provide me step by step guide from scratch it would be great.. thanks in advance ..
please help me out…thanks..
Hi,
I followed a part of your article to install junos on vmware and virtulabox.
If I use the same version of FreeBSD of article and all work fine, but if I follow the same steps with FreeBSD-8.1-RC2-i386 does not work and receive the errors below:
WARNING: This installation will not succeed.
WARNING: The boot device is less than 256M.
WARNING: A hardware upgrade is required.
But my VM has 3GB “/”, 1GB “swap”, 1GB “/config” and 3GB “/var” and 768MB of RAM.
I don’t know because receive this error. Do you test the procedure with other FreeBSD versions?
“FreeBSD-8.1-RC2-i386″ is the later version and has more hardware requirements.
Ok! But, do you test with other freeBSD version?
Thanks
I didn’t try it out on other BSD versions because of more requirements/memory,
Compatibility issues can arise in “jinstall”.
Remember you want to be able to run more instances on junos at a time.
If you are going to use say 512 mb per router, your lab will be limited to only a few routers, depending on your memory.
You may try the installation with frenzy.
http://frenzy.org.ua/eng/
[...] http://sushantwagle.wordpress.com/2009/12/30/gns3-0-7rc1-supports-junos-lets-try-it-out-part-1/ [...]
hai i cant install SDL
i downloaded SDL tar file,extracted,run ./configure,make
when i use make install following problem occurs
/bin/sh build-scripts/mkinstalldirs /usr/local/bin
/usr/bin/install -c -m 755 sdl-config /usr/local/bin/sdl-config
/bin/sh build-scripts/mkinstalldirs /usr/local/include/SDL
for file in SDL.h SDL_active.h SDL_audio.h SDL_byteorder.h SDL_cdrom.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_getenv.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_platform.h SDL_quit.h SDL_rwops.h SDL_stdinc.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h; do \
/usr/bin/install -c -m 644 ./include/$file /usr/local/include/SDL/$file; \
done
/usr/bin/install -c -m 644 include/SDL_config.h /usr/local/include/SDL/SDL_config.h
/bin/sh build-scripts/mkinstalldirs /usr/local/lib
/bin/sh ./libtool –mode=install /usr/bin/install -c build/libSDL.la /usr/local/lib/libSDL.la
libtool: install: /usr/bin/install -c build/.libs/libSDL-1.2.so.0.11.3 /usr/local/lib/libSDL-1.2.so.0.11.3
libtool: install: (cd /usr/local/lib & })
libtool: install: (cd /usr/local/lib & })
libtool: install: /usr/bin/install -c build/.libs/libSDL.lai /usr/local/lib/libSDL.la
libtool: install: /usr/bin/install -c build/.libs/libSDL.a /usr/local/lib/libSDL.a
libtool: install: chmod 644 /usr/local/lib/libSDL.a
libtool: install: ranlib /usr/local/lib/libSDL.a
/bin/sh: /media/c/My: No such file or directory
make: *** [install-lib] Error 127
PLZ HELP
am using a debian 5(Lenny) OS