Search This Blog

Monday, December 20, 2010

Installing Juniper router OS JunOS 10.1 in Qemu(VM) for GNS3

hello this the instruction and Steps by Steps video to install JunOS 10.1 in Qemu for GNS3 for Juniper router simulation


Download the required software
1. JunOS 10.X (use Torrents may OS Image are available from there i also got) Link
2. Download FreeBSD 4.11 as base OS for Router Download
3. Download Qemu 0.11.0 from GNS3 web site  Download
4. Need to Software to create CD ISO image. ex: Deep Burner
Time to Start

Step 1
download all the given files above
Step 2
Extract Qemu in a folder
Step 3
open cmd and navigate to extracted folder
step 4
create a HDD image to install JunOS of 4GB
qemu-img.exe create j.img -f qcow2 4GStep 5
Step 5
Start the Qemu with Free BSD CD and Created HDD
qemu.exe -L . -m 256 -hda j.img -boot d -localtime -cdrom ..\4.11.4.11-RELEASE-i386-miniinst.iso
Step 6
Install Free BSD in Qemu
Steps
Skip Kernel configuration
Choose standard installation
With fdisk, press A to allocate entire disk for bsd
Select: install a standard MBR
Create partition (with C)
    512M for /
    1024M for swap partition
    128M for /config
    and the rest for /var
Choose installation type: user, and select No for FreeBSD ports
X to Exit the menu and install from CD/DVD
Wait until it's done
Yes for chance to set any last options
Type root password
Select 'X' to Exit the installation, it will reboot
while it's rebooting, exit from Qemu by pressing Ctrl-Alt-2,
then type: q
Step 7
Make JunOS ready to transfer in guest OS
Create a CD Image (ISO) of junOS (using deepburner or any of it kind) and save in Qemu Folder with name like j8.iso
Step 8
Make JunOS Ready for Installation
qemu -L . -m 512 -boot c -hda j.img -cdrom j8.iso
We need to untar the signed jinstall file first:
#mount /cdrom
#cd /var/tmp
#mkdir junos
#cd junos
#tar zxvf /cdrom/jinstall-10.1R1.8-domestic-olive.tgz
Then untar the unsigned image:
#mkdir jinst
#cd jinst
#tar zxvf ../jinstall10.1R1.8-domestic.tgz
Extract the pkgtools.tgz file and replace the checkpic binary inside with /usr/bin/true :
#mkdir pkgtools
#cd pkgtools
#tar zxvf ../pkgtools.tgz
#cd bin
#cp /usr/bin/true ./checkpic
#cd ..
Create tar for pkgtools then remove the directory:
#tar zcvf ../pkgtools.tgz *
#cd ..
#rm -rf pkgtools
Create tar for the new jinstall package with modified checkpic
#tar zcfv /var/tmp/j.tgz *
Then install the new jinstall with bsd pkg_add tool:
#pkg_add -f /var/tmp/j.tgz
It will ask to reboot to continue the installation.
One installation is finished and prompt is returned press Crtl+Alt+2 then type “q” press enter
Step 9
Install JunOS in Guest VM
“qemu -L . -m 512 -hda j.img -serial telnet:127.0.0.1:1001,server,nowait,nodelay –localtime”
open new cmd and do telnet to 127.0.0.1 to enjoy the watching installtion process of JunOS
Once Prompt appear type cli to start junOS configuration
 
Enjoy !!!!!!!!!!!!!!!!!!!!!!

22 comments:

Unknown said...

Is it possible to run two instance of juniper router.If yes please suggest

Unknown said...

Is it possible to run two instance of juniper router.If yes please suggest

tim said...

it 's awesome!.
thank you so much for sharing this valuable video.

hope the second video will coming soon,"adding Junos into GNS3"

Unknown said...

at step:

mount /cdrom

i get:

cd9660: dev/acd0c: Input/output error

Have any solutions?

Unknown said...

check the command you start qemu in windows

Unknown said...

Have anybody mapped in gns3

Unknown said...

dennis.

on previous comment i asked ho to fix
cd9660: dev/acd0c: Input/output error

on #mount /cdrom

the solution is to change the image directory in tmp (windows)

Anonymous said...

I'm getting the same error on

# mount /cdrom

Can you expand on what you mean by " change the image directory in tmp (windows)" ??

Unknown said...

"Clue"
Check out Step 8

Make JunOS Ready for Installation

qemu -L . -m 512 -boot c -hda j.img –cdrom j8.iso

j8.iso file path is wrong

put the full path or change copy the fiel j8.iso in same dir of Qemu

eokane said...

Hi,

I get as far as creating the img. When I input:
qemu -L . -m 512 -hda Junos-10-1.img -serial telnet:127.0.0.1:1001,server,nowait,nodelay –localtime

I get:

qemu: could not load PC BIOS 'bios.bin'

Any idea what the problem is?

Cheers,
Eamon

Bayzid said...

hi,
after following this steps I also configured it on GNS3 and there I run Jniper router. But problem is that I can not input any command. I login as root and found
root@%
and when I type 'configure' it says unrecognized command.
It seems I have to switch user or something else.I have tried 'su' but fails. please help.

Thanks in advance.

Unknown said...

to Bayzid

type the command
cli
to start configuring the JunOS

saintshaka said...

first of all thanks for your efforts! my problem is that the cpu usage is stuck on 100%, but only on 1 cpu ( no load balance ). Any clues if is there a sort of idle-pc as well?
bye and greetings from italy

Unknown said...

"cpu usage is stuck on 100%"

try kqemu with qemu to reduce cpu
follow this instructions
download from this site

Unknown said...

Its a really good and well prepared video.I have a question.I followed all the steps in the video.After creating iso file from tgz file(jinstall-10.1R1.8-domesti­c-olive).If i execute the command in cmd:
qemu -L . -m 256 -boot c -hda j.img -cdrom ..\j10.iso
it opens the qemu and starts booting from hard disk but it get struck at that point.(at step 7)

Please help. what should i do???thanks

sudhir said...

i run the command “qemu -L . -m 512 -hda j.img -serial telnet:127.0.0.1:1001,server,nowait,nodelay –localtime”
after not open "telnet 127.0.0.1 1001" in New cmd

pls Help me

thiha said...

Thank you so much for everything blog.ezzi.in :) Now I'm in

--- JUNOS 10.1R1.8 built 2010-02-12 17:15:05 UTC
root@%
root@%

root@%
root@% cli
root>

root>

thiha said...
This comment has been removed by the author.
Unknown said...

what is the password for qemu i have tried root and password. pleease help

Unknown said...

very good article...

forgot router password

K said...

Hi. after putting this command:
"qemu -L . -m 512 -hda j.img -serial telnet:127.0.0.1:1001,server,nowait,nodelay –localtime"

I am having this output: Missing operating system.

I tried to do the steps again but same output. Please help.

Thanks.

Unknown said...

It's working great.
very good video and article.