I like playing around with the latest versions of FreeNAS before they are released, but not by running the latest version on my main server.  Oh no!  The best way to do this is to create a FreeNAS VM on the FreeNAS server, although after upgrading to 11.1-U4 I was struggling to make this work.

 

 

Thanks must go to KrisBee for his help in this thread on the FreeNAS forum.  After a number of failed attempts, he eventually found a solution which utilised the little knowledge of iohyve I’ve gained when I built the VM for CrashPlan, which I blogged about here.

 

It was actually pretty straightforward, although needed some commands at the CLI as creating using the WUI doesn’t work.  Here’s what you’d need to do in the FreeNAS shell:

 

Configure and Install

 

[root@freenas ~]# iohyve fetch https://download.freenas.org/11.2/MASTER/latest/x64/FreeNAS-11.2-MASTER-201805280436-ae00627.iso
(changing this path to the version of FreeNAS you want to virtualise.  Make sure you don’t select the NOGRUB version!)
[root@freenas ~]# iohyve create fnas 8G
(I called the VM fnas with a 8GB drive to boot from, but you can call it whatever you like.  I’d suggest not calling it freenas as if you use iohyve forcekill freenas it will kill the host too!)
[root@freenas ~]# iohyve set fnas ram=4G cpu=1 os=freebsd loader=grub-bhyve
(this configures the VM properties)
[root@freenas ~]# iohyve install fnas FreeNAS-11.2-MASTER-201805280436-ae00627.iso

 

This should start the installation process, so you’ll need to SSH into your FreeNAS host and run:

 

[root@freenas ~]# iohyve console fnas

 

You should then see the FreeNAS installation process as you would if you were installing FreeNAS onto metal.  The important step is selecting BIOS Boot when you get toward the end of the menu options, otherwise, it won’t be bootable after completing the installation.

 

Tweak and Boot

 

When it’s complete there are a couple of extra steps:

 

[root@freenas ~]# iohyve set fnas loader=byhveload
(if you leave it set to grub-bhyve it won’t boot)
[root@freenas ~]# iohyve add fnas 10G
(this adds some virtual storage drives so you can create a pool in the FreeNAS VM. I just created 2 and mirrored them, but configure as you like)

 

And that should be it.  You should now be able to start the FreeNAS VM with:

 

[root@freenas ~]# iohyve start fnas

 

Check back in the SSH console to see what IP address is assigned and then connect to the WUI using any browser (although Chrome is working much better for me than Safari with a 11.2-BETA1 VM) at HTTP://<IP_address>

 

Hope this is of some help if you’re trying to do this at home!  It would be nice if the iohyve VM were visible in the FreeNAS WUI, but I’m just happy that I can create a FreeNAS VM to play with on a FreeNAS host (which I used to do using a  VirtualBox jail on 9.10.1-U1).

 

It will allow me to plan my upgrade to 11.2, which in all honesty is unlikely to be until at least 11.2-U2 😀