Now, you remember that ISO image we made all the way at the beginning? Well, now we actually use it.
From the command prompt “qemu -L . -m 256 -boot c -hda j.img -cdrom ..\jinstall.iso”
That’ll launch qemu again and mount the image for installation. Login when prompted
Let’s clear some room to work with:
Mount the cdrom “mount /cdrom”
Create a temp directory for Junos “mkdir /var/tmp/j/”
Change to the new directory “cd /var/tmp/j/”
And make sure you’re actually there “pwd”
Extract the Junos files “tar zxvf /cdrom/jinstall-10.1r1.8-domestic-olive.tgz”
Make pkgtools directory “mkdir pkgtools”
Go into pkgtools directory “cd pkgtools”
Verify that you’re in the right spot “pwd”
Extract pkgtools “tar zxfv ../pkgtools.tgz”
Go to Bin directory “cd bin”
Copy true file “cp /usr/bin/true ./checkpic”
Back up one level “cd ..” (there’s a space in there)
Zip the file again “tar zcvf ../pkgtools.tgz *”
Back up one level “cd ..”
Remove pkgtools directory “rm –rf pkgtools”
Rezip to Junos “tar zcvf ../junos.tgz *
Install Junos “pkg_add –f /var/tmp/junos.tgz”
Here’s where you end up:
“init 6” then ctrl + alt + 2 “q” to kill it
Now we’ve got a working image. Time for the GNS3 part. Open up GNS3 and go to Edit > Preferences > Qemu. Change the working directory, path, and img path.
Go the Junos tab and add your image…make sure to save it
You should now be able to drag Juniper routers into your topologies.
A few things I’ve found:
1) Connect your links before starting the router, they don’t like changing things once they’re running
2) They take a long time to boot. Yeah, it sucks, but at least they work
3) These images don’t do everything. You may be able to put in a command and it seems to take, but the feature doesn’t work. Kind of a pain…
4) Make sure to save the nvrams and harddisks of your devices in your projects. With Junos stuff make sure to save while the device is running.
5) Important: hit crtl+alt to free your mouse from a qemu window should you accidently click in there.