FreeNAS on VirtualBox – Installation

We are going to get FreeNAS installed using VirtualBox today.  This will most likely be the longest post of the series as I’ll be doing quite a bit of hand holding. Since we are using a virtual disk there won’t be much you can mess up and the worst that can happen is you’ll have to start over.  So if you feel like playing around with it yourself go right ahead but if you are having trouble I’ll be right here holding your hand and walking you through how it should be set up.

Before we dive in and get FreeNAS running in a virtualized environment we need to get that environment set up.  We’re going to be using VirtualBox so head on over to the downloads page and download the one that is appropriate for you.  I’m working on an Intel Mac which means my screenshots may look different than what you’ll be looking at but for the most part everything will be the same.  If you are on a PC go for the x86 version unless you know for sure you are running AMD 64 bit hardware then go ahead and get that one.

While you’re downloading VBox it’s also a good time to start downloading the latest FreeNAS release too.  So head on over to their downloads page and look for the LiveCD.  Once again the i386 version will be just fine for you unless you know as a fact you have AMD64 hardware.  A LiveCD is basically an image that can be burned to CD or DVD that you can boot your system up with and run just like you would had you actually went through the trouble of installing it.  It’s great for things like trying out linux or even booting into Linux to troubleshoot a computer problem.  With FreeNAS you could run the whole server off nothing but that CD and a usb or floppy disk to save your configuration to.  For our purposes we’re going to go ahead and install the Full installation of FreeNAS though so we can do some other fun things later.

Once you get VirtualBox downloaded go ahead and install it just like you would any other program.  The default options should work just fine.  Go ahead and launch it.  You should now be presented with a screen that looks like this probably after they bug you about your contact info (you can skip it):

Main window

Main window

What we want to do know is set up a new virtual machine.  We are going to tell this program the different types of things we want in a virtual machine like memory and hard drive space.  To start with press the big blue button labeled ‘New’ which will start the New Virtual Machine Wizard.  Click next and then give your machine a name.  I’ll be using ‘FreeNAS Test’ without the ‘ of course.  To configure the OS Type You should choose BSD as the Operating System and FreeBSD as the Version.  One page down!  Hit next.

It should now be asking you the amount of base RAM you want.  It recommends that I use 128MB and it is actually already set for me.  the exact amount FreeNAS requires escapes me at the moment but the hardware footprint it needs to run is very small and you’ll do just fine at 128MB.

You should now be coming to the Virtual Hard Disk portion of the wizard. We’ll want to create a new disk so press the button labeled New.  This will bring us into an entirely new wizard designed to set up our disk.  For the disk we have a couple of options; dynamically expanding or fixed.  I always choose dynamically expanding which means that as you use more space on the virtual machine the size of the disk will grow with you as you need it so your not wasting space.  Click Next and enter how large you would like your disk to be and give it a name.  The name ‘FreeNAS Test’ was already filled in for me and I’m keeping it as well as the size of 2GB which I will also keep the same.  Keep moving along and it will verify that you are creating the disk and tell you where it will be located because in essence, your virtual machine is just a file on your computer.

Now the disk should have automatically populated in the drop down menu and you can now hit next.  If it didn’t just select the drop down menu and select the disk we just created.  That bring us to this screen verifying all the things we just told it to do:

Create New Virtual Machine Summary

Create New Virtual Machine Summary

Now you’ll notice that you have a Virtual Machine showing up on the left hand side of the VirtualBox window and you may be tempted to hit Start and boot up.  Not quite yet, we still have a couple more things to configure.

First click on CD/DVD-ROM and we want to point it to the FreeNAS file we downloaded earlier.  Tick the box for Mount CD/DVD Drive, and click on the radio button for ISO Image File.  In the Media Manager you’ll want to click on add and find the file you downloaded earlier to add it.  You’re looking for the file that starts with ‘FreeNAS’ and ends with ‘.iso’.  Once you select it and click through you’ll see it show up under your virtual hard disk.

Now look a little farther down for ‘Network’.  More than likely the adapter type that is chosen is correct but you’ll want to change ‘Attached To:’ to say ‘Host Interface’.  Once you’re done with that we are finally ready to start the machine so go ahead and hit the green arrow labeled ‘Start’!

You should be presented with some information about what they call the host key.  Make a note of what this is for you.  If I recall correctly it’s right-ctrl for Windows.  You’ll need to press this to release the keyboard and mouse back to the host Operating System (OS).  Once you get booted up you’ll see a black and white interface with some menu options:

FreeNAS Boot Screen

FreeNAS Boot Screen

Remember when I said this is a LiveCD?  You are running FreeNAS right now!  Although, you won’t be able to do much since we haven’t set anything up yet. Instead of configuring this LiveCD we’re going to go ahead and install it for ourselves.  Go ahead and press 9 and hit enter.  Another menu will come up with a few more options and a little more color.  We are looking for option 3 or the one that says “Install ‘full’ OS on HDD + DATA + SWAP Partition” so go ahead and choose that.  It’s going to tell you it’s going to create everything for you and the data on the disk will be lost.  This is ok because it’s the virtual disk you created not your actual hard disk.  Press OK and and then OK again to tell it to use the VBOX CD.  If you created the virtual hard disk like I said you’ll now see asking where to install the OS and something like “ad0 2048MB <VBOX HARDDISK/1.0>”.  Keep hitting OK here.  Here is where we are going to change it up a bit.  We are going to want some additional space later to play with some things so lets bump up the OS Partition size from 128 to 256.  That should be enough room.  Don’t worry about a swap partition.  It’s the equivalent of a pagefile in windows and I’ve never seen it being utilized in any of my FreeNAS installs but if you want it and you know what you are doing then by all means, it can’t hurt.  Now it’s going to give you some important information about getting your first disk set up and ready to go which looks something like this:

How to use the FreeNAS Disk

How to use the FreeNAS Disk

This is some pretty important information and some you may want to write down had I not just posted a picture of them here.  Don’t worry, I’m also going to walk you through what they are telling you to do.  So go ahead and press enter and then exit the install menu and you’ll be back to the original black and white menu that came up.  Press 7 to reboot the system confirming that that is really what you want to do.

Once you are rebooted and back to that good old black and white menu go ahead and press 2  for Set LAN IP Address.  Now we will use the default settings so pressing enter 3 times should get this set up for you.  Use DHCP to set the IP, say no to configuring IPv6, you’ll see the IP for the web GUI and then press enter the third time to continue after making a note of the web address for the GUI.

I’m in a hospital right now so my IP is a little funky but you’ll probably see something like but as long as you have some numbers in that configuration you should be fine.  Go to a new tab in your web browser and put that address in.  If you’ve followed my instructions you should now be prompted for a username and password.  The default username is “admin” and the password is “freenas”.  Now you will see your shiny new GUI!



We’re almost done here with the most basic set up.  Just bare with me.  We now want to add the disk like the instructions told us to do earlier.  Hover over Disks and click on Management.  To the right you’ll see a plus symbol, click on it.  In the drop down make sure the disk that you were told to add earlier is selected.  In my case it’s ad0.  For the description type in FreeNAS Test Disk.  Leave everything else except for the last item, Preformatted File System, and set this to UFS since the installer took care of that for us.  Later on if you add a disk to the system you’ll set this to unformatted and format the disk through that option in the Web GUI.  Click on Add and then make sure you click on Apply changes so that they take effect.

Now that we’ve added the disk let’s set a mount point so we can access it.  hover over Disk and click on Mount Point.  Once again click on the plus off to the right.  the type is Disk, the Disk drop down should be set to the disk we just added.  for partition you’ll notice there are some comments.  Number 2 fits our description, “2* second MBR partition (DATA partition) if you select option 2 during installation on hard drive (all versions).” so go ahead and select that.  file System is UFS and for the sharename put freenas.  Enter a description if you like and then leave everything else the same as you click add.  Don’t forget to apply your changes now!  You’ll notice that  a lot of adding and removing and configuring stuff deals with the plus symbol off to the right or other symbols like a minus and some tools and after you’ve changed something you always want to apply the changes.

We have the disk set up and mounted but how do we access it now?  We need to set up a CIFS/SMB share so that other computers including the one you installed the virtual machine on can access it.  This is the equivalent of sharing a folder in windows by right clicking on it and enabling sharing in Windows.  So mouse over Services and click on CIFS/SMB.  At the top off to the right you’ll want to enable this service.  If you know your Workgroup name is different go ahead and change it but leave everything else the same and scroll to the bottom to press Save and Restart.

It should tell you that everything had been applied and now all you have to do is set up what shares you want the service to have access to.  Right now we only have the one disk so we’ll add it.  Click on the shares tab and the plus off to the right.  For the name type FreeNAS and give it a description.  We need to browse to the path of the share so click the 3 dots by Path.  You’re only option should be freenas because that’s what we named our disk.  Click on that and hit ok and the path will be filled in for you.  Something like “/mnt/freenas/”.  Leave everything else the same and click Add and then Apply changes.

Congratulations!  You now have the most basic set up completed.  At this point you may want to save your configuration so if you play around and break something you can always fix it.  You’ll find this by hovering over System and click on Backup/Restore.

What you can do with this setup is connect to that disk from any computer on your network.  The instructions are different from operating system to operating system but generally you want to go into my network places and browse for network computers.  you should see one that is labeled FreeNAS and clicking on it will show our mounted Disk with no files on it.  You also may just want to mount the drive my going into My Computer, clicking on tools and the Mount Network Drive.  Assign it a drive letter, browse to the drive, and then click on OK or finish and it will then show up in My Computer just like your other Hard Drives.

Be Sociable, Share!

30 thoughts on “FreeNAS on VirtualBox – Installation

  1. Hi James,

    I have some trouble linking the host interphases through virtualbox to freenas (on Macbook Pro) – as a result freenas does not have connection to net and one cannot log on to server. Could you write a bit more exact how you did set up the network adapters on virtualbox?

  2. Make sure you are using bridged networking and not host only. I've had that problem before where it wasn't getting a standard IP from my router. In the near future I'll try to get some better instructions up.

  3. So this FreeNAS on virtualbox has full function like installed from the scratch?

    if so, does it mean I have to run virtualbox before I run FreeNAS after I reboot the OS (e.g. WinXP)?

    How do I run FreeNAS after started virtualbox?

    If FreeNAS is fully functioning, does it manage (save, delete e.g.) files on the physical disks/space like in the normal installation?

    If so, How do I allocate disk space for FreeNAS usage, since I am still having OS (winxp)


    Peter Guan

  4. Yes, you will get full function. Whenever you use VirtualBox to virtualize any operating system it's as if you've installed it fresh on a new hard drive. You will need to start virtual box everytime you would like to run your FreeNAS VM (Virtual Machine) but you could use VMWare server that will start and suspend the machine everytime the host computer boots up and shuts down. If you'd like I'll write up a detailed post on how to get that going.
    Once you get VirtualBox going you'll see your VM in the list and all you have to do is highlight it and then click the big green arrow labeled start. The machine will boot up as if you were booting up another computer. You'll have full access to your host computer as well as your FreeNAS VM.
    As far as the disk goes you'll be using a virtual disk. It basically creates a file on the host os that tells the VM that this is the space allocated to it. The VM then controls that file as if it is it's own partition and it will need to be formatted and everything like normal.
    If you need extra space you can create another virtual disk and add it to the machine. Then within Freenas you will need to add the disk, format it, and then create a mount point.
    Hopefully this answers your questions!

  5. Thanks so much, James

    You have cleared all my concerns about using FreeNAS on XP, so that I could have both XP and FreeNAs possible..

    thanks very very much….

    Peter Guan

  6. James,

    How to set disk quotas for individual user??

    I am very newbie to FreeNAS, but I also could not find any result from google.

    thanks in advance

  7. Peter: Unfortunately I'm not seeing anything about quotas nor is anything in a quick search turning up any positive results. If I were you I would ask your question over in the FreeNAS Forums and someone there would be able to give you a better answer.

  8. “We need to browse to the path of the share so lick the 3 dots by Path”

    I did that but nothing happens. lol.

    P.S. many thanks for the article, very useful.

  9. Hi James,
    I'd really like to read someting about installing FreeNAS on vmware Server, if it's possible.

    I also have a question about using FreeNAS software RAID 5 running on vmware server with Windows as host OS. I'm a bit confused about filesystem.
    What I have understood is:
    I have to format disks I would like to add in the NAS by the host OS.
    Then I have to create a virtual disk from the vm software and add it to make it visible to FreeNAS.
    So I can format them in FreeNAS using one of the available filesystem.
    After I have to mount the disk and make a software RAID.
    Is this correct? Is this the best way to follow?

    The last question is about hardware. If I run FreeNAS over a VM, I would not have (quite) any hardware compatibility issues, right? If my vm software can serve the right virtual device for FreeNAS I'm free to use whatever I like…or not?

    Thanks a lot for your help,

  10. @James
    good article. I want to follow up on one of the questions being asked earlier. How do I access an hard disk already on the host? Ideally I would like the ability to access that disk from the guest and host at the same time. so I thought about using the “shared drive” feature, but I was stopped by the fact that I can't really install the necessary virtualbox addons. seems that the freenas is missing too many basic commend. Next I thought of using smbclient to mount a share from the windows host, but no, smbclient is not part of the freenas. I also tried to access the host drive via usb, since it's happen to be a usb drive, but that would make it disappear from the host. Any suggestions?

  11. If you would just like the disk to be available for both the Host and FreeNAS then mount it in freenas and then share it. Then connect to the share in the host. Again though, if you are going to use FreeNAS for any serious work you should just find some old computer parts and throw a box together. The hardware requirements aren't that much and I'm guessing you could actually find someone that wants to get rid of an old dell or something.

  12. I followed the instructions of your post and everything is working (thanks!), but I was wondering if now I can add existing disks (with different partitions in NTFS file format) to make them accessible in the LAN.

  13. Not if you installed via the VM as outlined here. FreeNAS can only see the disks that are available to it as set up in VirtualBox. If you had an install on a dedicated pc it would be able to use any disk you attached to it as soon as you set it's mount point and shared the disk.

  14. Thank you very much for your reply! I feared that it couldn't be done in virtualbox.

    That's a pity, because if ad example I install Win7 with virtualbox, I can add in the Win7 resources existing hard drives (as if it was a shared network folder—>, so it can access with no problem hard disks outside the virtualbox environment.

    Anyway, thanks again! 🙂

  15. I asked in the VirtualBox forum and it looks like it's possible.
    At chapter 9.10 of the VirtualBox manual it's explained hot to use “a raw host hard disk from a guest”.

    It looks like it's a little bit risky as if not carefully setup it could corrupt the existing data.

  16. I asked in the VirtualBox forum and it looks like it's possible.
    At chapter 9.10 of the VirtualBox manual it's explained hot to use “a raw host hard disk from a guest”.

    It looks like it's a little bit risky as if not carefully setup it could corrupt the existing data.

  17. Successful everything!
    However, when I reboot the freeNAS system, its as if it's returned to factory preset.

    Why do you think that is?

  18. many thanks for excellent guide; found it very easy to follow and worked first time (Windows XP SP3 host, IBM Thinkpad T61)

  19. many thanks for excellent guide; found it very easy to follow and worked first time (Windows XP SP3 host, IBM Thinkpad T61)

  20. Very good info about using VB FreeNAS. I want to use my htpc with 6 TB of storage (4×1.5 TB HD) also as a NAS. Running a HTPC with Media Portal an using VB freenas sound very interesrting. Can i mount also maps on my system (shared maps in VB) in freenas? I read some info and think it cant be done 🙁 if not, VB can make virtualHD's 2TB max. is it possible to make more virtual hddisks in virtualbox in freenas?? Thx for youre awnser.

  21. You can make as many virtual disks as vb will let you and use them all in freeness. Keep in mind tho that speed is going to be a problem and for environments where you want to rely on freeness heavily you should run it on a dedicated system. This tutorial is more to let you see if you'll like the features enough to use it full time.

  22. Just tired, everything was going fine up until the point where I was setting up the Virtual Machine. I must have a different verison of things. (virtual box 3.2.4) I figured out how to get the iso image hooked up, but the Network is defaulted to NAT, and “Host Interface” is not an option. I left it at NAT. I started the machine and got a box with 6 option, not 9, and then off it went, and ended up giving me mountroot>
    FreeNAS is 0.7.2, have things changed that drastically?

  23. I had similar problems, but discovered the following: a) for your network, change NAT to Bridged Adapter, then click 'advanced' below that, and choose adapter type 'PCnet-PCI II' – the default adapter type won't work in FreeBSD. b) to stop going to mountroot>, in system–>base memory, bump it up from 128 to 256. That resolved my mountroot> problems. Good luck.

  24. Hi James, I like the article you wrote. Except my variation of things made me hit a wall. Background info : Host : Linux Mint5 KDE Elyssa, Virtualbox by Innotek OSE from mint5 linux repository verstion 1.5.6_OSE. I was able to get FreeNAS installed to a vbox vm, except it didn't assign any ip to access it..all I got was and For the Network option under the version of Vbox I use, I get an error when I try to use Host Interface, I don't have a bridged option either. It gets up and running if I choose NAT..but then I can not access the VM and it will not assign an IP. I tried manual IP address..and the dns too, got that from my router and tried to use open dns also. None of that helped. Any ideas would be great. Since right now I don't have a spare box to dedicate yet to FreeNAS.

  25. I'm not real familiar with linux or mint. I would try posing your question

    to the forums at vbox or a linux site dedicated to mint. If you were using

    Windows I'd ask you if you had tried rebooting 🙂 Perhaps there is a

    virtual lan driver that virtual box installs that didn't get installed. Are

    you using the freeware version of virtualbox or the one that comes with

    drivers that aren't considered freeware? I always had trouble with the one

    that was freeware and I always installed the one that wasn't. Hopefully one

    of those things will guide you down the right path. Take care!

Leave a Reply

Your email address will not be published. Required fields are marked *