
Running JunOS Under VMWare (Updated – Again!)
Building a JunOS Olive in VMware. Install FreeBSD 4.11, swap out the checkpic binary so jinstall completes, and get past the VMware Server hang on SCSI disks.
Interested in trying out JunOS? Can’t afford to build a real Juniper lab? Sounds like you need some Olives. No, we’re not talking about the green fruit commonly seen in a martini glasses across the nation. Olive is the codename name given to JunOS software running on something other than a Juniper router. It can either run on a PC of similar specifications to a Routing Engine, with no forwarding hardware (or PFE) attached, or inside a Virtual Machine (VM). If you took a Routing Engine out of a Juniper router and booted it in a blade server chassis, it would effectively be an Olive.
This guide is to help you run Olive inside vmware to create a virtual Juniper router lab. You can also extend your lab to dynamips (Cisco Emulation), or other router VMs that you may have. My screenshots will be from VMWare Fusion on Mac OS X, but should work perfectly well, possibly even better (since you’ll be able to setup multiple interfaces) on VMWare Server. At some point, I would like to test using VMWare ESXi as well.
As far as ESXi is concerned, this only works on 4.0 which requires x64 hardware. I’m out of luck and stuck running ESXi 3.5 for now.
Software
The first step is obtaining a copy of JunOS. I recommend using 9.4 (jinstall-9.4R1.8-export-signed.tgz) or higher as earlier versions had issues with multicast working properly under vmware. Do not ask for me for copies of JunOS Since JunOS runs top of FreeBSD, you will also need to download the FreeBSD 4.11 mini .iso from the FreeBSD FTP site.
Setting up your Virtual Machine
Our initial settings should be something along the lines of …
- Disk – IDE 4gb
- Memory – 512MB (you can reduce later to 128MB (or less ( untested ) ) )
- Interface – NAT or Shared ( up to you )
- CD/Optical – Point to the FreeBSD ISO
Installing FreeBSD 4.11
Feel free to skip the custom kernel config
Standard Install
On fdsik screen select a (use entire disk) then q (finish)
You can use the default FreeBSD boot manager
[singlepic id=194 w=100]In the BSD Disk Label Editor, use the following setup.
ad0s1a / 512M
ad0s1b swap 1024M
ad0s1e /config 12M
ad0s1f /var the rest- Next it will ask you which distribution set you wish to install. Go with User, and do not install the ports collection.
- On the next screen, choose CD as your media for install. It will then ask if you you’re sure you wish to proceed. Choose yes, unless you’re scared.
Post Install Config
After the install, you’ll be taken through some configuration options…
Config Ethernet: Yes
Select em0
Config IPv6: No
Config DHCP: Yes
Network Gateway: No
Config Inetd: No
Config Anonymous FTP: No
Config NFS Server: No
Config NFS Client: No
Select Default Security Profile: No
Customize System Console: No
Set Time Zone: Yes/NoIts really up to you if you want to do this…
Enable Linux Binary Compatibility: No
Non USB Mouse: No
Browse Package Collection: No
Add Accounts: Yes
General Configuration Menu: No
After the post install config, you will be taken back to the sysinstall Main Menu, go ahead and exit / reboot
On the first boot, it may hang here for a moment, be patient..

Preparing and Installing JunOS
Ok, now that we have a working FreeBSD installation, we need to copy our jinstall image over using the account we created. Use ifconfig to figure out your DHCP address and scp the file over.. go ahead and put it in /var/tmp
In order to install JunOS, we have to circumvent some things.. Juniper has installed a binary in JunOS packages since version 7.4 called checkpic. This binary will fail during install and and interrupt the process. Extracting the package and replacing this binary with /usr/bin/true and repackaging fixes this issue.
cd /var/tmp
mkdir jinst-signed
cd jinst-signed
tar zxvf ../jinstall-9.4R1.8-export-signed.tgz
mkdir jinst
cd jinst
tar zxvf ../jinstall-9.4R1.8-export.tgz
mkdir pkgtools
cd pkgtools
tar zxvf ../pkgtools.tgz
cd bin
cp /usr/bin/true ./checkpic
cd ..
tar zcvf ../pkgtools.tgz *
cd ..
rm -rf pkgtools
tar zcfv /var/tmp/jinstall-9.4R1.8-export-olive.tgz *Install your new modified jinstall package.
pkg_add -f /var/tmp/jinstall-9.4R1-8-export-olive.tgzAfter it has finished, go ahead and issue a normal reboot command. Upon reboot, you may think the VM is hung, but its just fine. It is no longer outputting kernel messages to the screen, behind the scenes the JunOS install is completing and will reboot when finished. You will be able to login in a few minutes.
Update – 11/8/2009
VMware Server Users have had some issues with the secondary install (1st reboot after jinstall) hanging on the following line.ad0: 32768MB <vmware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33
The simple fix for this is to edit the appropriate VMware configuration file ( whatever.vmx ) and change the line that reads.
scsi0.present = "TRUE"to
scsi0.present = "FALSE"Since JunOS has no support for SCSI devices, this prevents it from hanging when one is present. Many thanks to the commenters that suggested this fix.
Post Install
To tell the boot loader to send kernel messages to the video console is simple. Just edit the file /boot/loader.conf and change the line that reads….
console="comconsole"to
console="vidconsole"
Conclusion
While this is far from a perfect solution ( at least under VMWare fusion.. ) It works quite well for getting your feet well in the JunOS environment. If you have any issues with getting this setup, feel free to comment below and I’ll try to point you in the right direction.
Also many thanks to everyone from the ineternetwork pro wiki, without their guide on qemu I would’ve been completely lost.
New posts in your inbox when they publish. No digest, no marketing.




Comments
55 archived comments from Disqus 2009–2013
Hi tony, First of all, nice tutorial. ;-). Did you try PIM or IPv6?… I think that isn’t works. Al least in my olive.
Thanks again.
Hi Tony I follow your guide and after the instalation, the VM “freezes” on “BTX loader 1.00 BTX version is 1.02” screen and don’t start. Have you any ideas about this problem?
Thanks
Hi Tony
In the current VM I used 256 MB of memory, so I deleted the VM and create another VM and this time I configured to 512 MB and before of reboot I insert the console=“vidconsole” line on the loader.conf
After reboot, the kernel messages appeared, but freezes in the line below:
“ad0: 4096MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33”
I uplodaed the screenshot of VM, see the link below: http://img35.imageshack.us/i/olive.jpg/
I searched in google for this issue, but I can’t found.
Sorry for my bad english, I’m from Brazil.
Thanks
i have the same problem as the gy from Brazil it just freezes in the line ad0: 32768MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33
Have you found any solution to this ?
Thanks
Hi Tony and everybody.
Sorry for my delay to reply your questions. I used three versions of jinstall: jinstall-7.4R1.7, jinstall-9.3R2.8 and jinstall-9.4R1.8. They all did not work. I suspected that issue could be the scsi because when you create the VM (in 1.0.9 and 2.0.1 versions I tested), previously you are required to select BUS or LSI scsi and only after you can select the IDE disk type and as your tutorial say, scsi don’t work.
I will try the Blackbird steps and inform about the tests.
Thanks everybody.
You need to make sure the scsi device is disabled. I had the same issue and it disappeared once I followed the following procedure.
http://www.certbible.org/howto-upgrade-your-vmwar…
Hi there Tony and all,
Thanks for this excellent tutorial on how to build an Olive. It has certainly helped me.
This post is for the benefit of Gil and Temi. I myself had an identical problem to you (it froze at the line: ad0: 32768MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33).
After a lot of experimentation I found that when I edited the *.vmx file associated with the Olive, it contained:
scsi0.present = “TRUE”
so, when I closed the VM first and then replaced the line above with:
scsi0.present = “FALSE”
and then ran the VM, to my surprise it all worked !
Note that after the ad0: 32768MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33) line appears you will have to wait for a few minutes while the hard disk whirrs away and nothing appears to happen, but eventually it will reboot into the command prompt as described in Tony’s article. I didn’t need to use the post-install “console” config at all.
Instead of using the Free BSD 4.11 mini ISO, I used the latest version of free BSD 6 (namely 6.4). I downloaded the ISO of this from here: ftp://ftp.freebsd.org/pub/F… using the top file in the list which is approx. 28MB. Then after installing, I used the initial FreeBSD config screen to automatically ftp to the FreeBSD server and install the other parts of the kernel (it’s called something like ‘installation of binaries and documentation for kernel developers’). This downloaded approx 50MB of additional files, before the extraction begun.
The reason I used a 6.4 kernel is because Junos 9.x is based on the 6.1 kernel, and I couldn’t find a 6.1 anywhere.
Also the Juniper pages state that a compact flash of 1024MB should be used, so I used 1024MB for the VM memory setting.
I used Junos 9.0R1.10 for the install and it’s all loaded and appears to work, though not tested multicast yet.
Good luck!
I had heard that 9.x was based on a newer FreeBSD version, I may attempt to use the this newer release when I finally get my VM Server finished. ( Had attmepted to use ESXi but you can’t run IDE disks, nor can you run VMware Server under a VMware ESXi host… )
Thanks for this info Blackbird, I hope it really helps these guys out !!
Hi Tony and all.
I do the Blackbird steps and work it, it’s exactly the scsi parameter that he mentioned.
Tony, I suggest you put on your tutorial this detail because others may have the same problem (my friend had the same problem).
Thank you all for your help and Tony congratulations for the excellent tutorial.
Hi all,
I sucefully installed version jinstall-9.6R1.13-export-signed.tgz !
I only configure the ip interface on a em0. I will be testing for know the multicast is working too.
Thanks from Brazil !!!
Hello friends
Where i can get a JunOs image, can you provide to me a link to download it?
I’ve got the FreeBSD VM up and running. How do i now add the junos image to the cd /var/tmp directory and ftp it from there? Also i haven’t been assigned an address to the em0 interface in my FreeBSD machine. Any help?
Gungajim.wordpress.com
Cheers for that! I got my first olive up and running :) Can you help me in trying to run multiple olives now? I’ve managed to assign the em0 interface, but how do i bridge the two together on mac without using Qemu? Do i still need a Serial interface or can i connect them via Ethernet?
Please help….
Thank you for this tutorial, we’re planning to use Olive VMs to duplicate our network in a test environment.
We’re gettng an error in FreeBSD when we tar zxvf the file. The error is: “gzip: stdin: invalid compressed data – format violated.”
We’re using jinstall-9.4R1.8-domestic-signed.tgz.
Anybody else having this issue?
Thanks in advance.
Doug
same happened to me, piece of cake: that error is after the ftp/tftp transfer because you didnt use the ‘binary’ format so if you are using tftp:
1/ tftp server_IP 2/ binary 3/ get file_name
that’s it!
Tony,
Thanks for the tutorial. I followed it and was able to successfully install using jinstall-10.1R1.8-export-signed. My question centres around management access to the install. I cannot seem to ssh or http to the install - though IP connectivity is confirmed. Looks like ssh/webserver isn’t installed as part of the FreeBSD. Is there a quick fix for this - or is it a case of reinstalling FreeBSD with missing modules first?
Ta.
I have one question where do i get the pkgtools.
mkdir pkgtools cd pkgtools tar zxvf ../pkgtools.tgz cd bin cp /usr/bin/true ./checkpic cd ..
Hi there Tony,
This is the best Olive (bring-to-life) setup yet!. I think I hit a brick wall here and my FreeBSD know-how is not up to par. I get this error somewhere <WARNING: Failed while trying to install bootstrap loaders
Deleting bootstrap installer … disklabel: bad pack magic number (label is damaged, or pack is unlabeled)>
right after running this last line
<pkg_add -f /var/tmp/jinstall-9.4R1-8-export-olive.tgz>
Please point out instances when this could occur. Do I have to do everything from scratch (FreeBSD install again)?
Thank you!
I have this running under fusion as well and everything seems to be fine under 9.6.
But I have encountered one odd thing. Has anyone noticed firewall filtering not working on the em<x> interfaces?
I can configure, and apply filters on any em interface I create but. It does not actually filter
and the output ends up displaying back “unknown” when you run a show interfaces filter.
It applies fine but does not filter and never actually shows the name on the interface outside of the configuration portion
Anyone seen this?
I have been running Olive for 2+ years now, and I finally got it working on ESXi 4.0.
I use Freebsd 4.10 with junos up to 9.6, then i switch to Freebsd 7.x Enhanced services do work in the 9.6+ code (polices and all).
but you are still limited to the em0 interfaces, so no DHCP and what not.
Hi,
Thank you for the tuto, it was very useful !
I have just one issue with my keyboard.. How can I use my “azerty” keyboard on Junos ? I change the keymap value on the rc.conf file but nothing changes.. ANy idea ?
Thanks.
Nicolas, french guy :)
Hey Nicolas,
I hate to say it, but I’m not sure how to set that up exactly.. A good guy to talk to would be either nemith on #cisco.. (irc.freenode.net) he wrote the Olive page on the inetpro.org wiki.. I honestly haven’t had too much of a chance to work on my olive lab.
After trying to install Olive with a few different solutions this one worked like a charm the first time…and it was easy!
Thanks.
Hi ,
I was able to run JUNOS on VMware player.
The only problem is on JUNOS, i am not able to see any em0 interface, however, it was accessible when running BSD.
under .vmx file i have these following options
ethernet0.present = “TRUE”
ethernet0.connectionType = “bridged”
ethernet0.virtualDev = “e1000”
ethernet0.wakeOnPcktRcv = “FALSE”
ethernet0.addressType = “generated”
Any ideas?
Thanks, Gaurav Sood.
Hi tony !
I follow your guide and after the instalation, the VM “freezes” on “BTX loader 1.00 BTX version is 1.02” screen and don’t start.
i am using junOS …jinstall-10.4R3.4-export-signed.tgz
I was wondering if anyone can actually help me out with this. My laptop does not have a Intel Ethernet NIC card. Instead I have an onboard -
Realtek PCIe GBE Family Controller series card. I have tried reading several forums over and over to make sure, but each one recommends/states an INtel NIC card as a prerequisite. Is there any work around for this. Any help is deeply appreciated.
Thanks,
My name is dev and i am facing following problem. :
=================== Bootstrap installer starting ===================
Initialized the environment
Routing engine model is Olive
No harddrive device found!
ERROR: recognize_model: Unable to discover hard drive
You are now in a debugging subshell (you may not see a prompt) …
Ls
anim dev mnt tmp
bin etc packagemnt usr
boot instrootmnt sbin var Please help me out. Thanks,
Hi everyone! Please I could use your help, everything looks ok, even I dont get error messages when adding the pkg but..
After I reboot I get this:
ad3: 32768MB <VMware Virtual IDE Hard Drive 00000001> at ata1-slave UDMA33 Trying to mount root from cd9660:dev/md0
I already changed the
scsi0.present = “FALSE”
Any ideas?? Thnx
i ’ve installed the junos and updated it and everything works fine with me. but can you tell me the steps of how can i go to the internet through my juons ? when i setup the freebsd i create one ethernet adapter and give it an ip in the same LAN i use bridged adapter. it’s not working with me. it doesnt even see a gateway