howto install freenas in hyper-v

I wanted to build a low budget Windows 2008 cluster home/test/lab (for example Windows 2008 certifications).

I chose FreeNas as my virtual iSCSI solution as it’s easy, low on resource requirements, stable and it supports persistent reservations out of the box.

  • download the latest live CD @ SourceForge
    please note that in the latest stable atm (Khasadar) iSCSI targets are broken. You can update to fix the problem, or try the latest nightly, but if you just want a quick install where iSCSI is working fine for our needs, use the latest 0.7 beta (Sardaukar)
  • size the VM as you want, but remember, Freenas has a low footprint. A 2GB disk for the OS is already overkill, 512MB will do.
  • add a legacy network card. You can probably get the normal NIC working, but I’m testing W2K8 clustering here, not FREENAS
  • connect to the console & power up the VM
  • enter 9 to install FreeNAS.
  • embedded os
  • you’ll need to enter the disk to install to & the source. When you start installing, it will appear for a few moments like nothing is happening, (mount cdrom) just wait till you see the installation is finished screen
  • when you see this screen, you can dismount the .ISO and reset the VM
  • FreeNas installs as DHCP, leave it like that or enter an ip with 2) assign IP
  • now, there is a little problem with Hyper-V and Freenas.  Everytime you reboot the machine, the network connection will not initialize properly. If you enter the IP again (with option 2) the network service gets rebooted, and the VM is reachable. reboot the VM, and it will be unreachable again. I’ve found this quickfix here @ MED64, you can prolly also fix this using VI, but this is easier.
  • with your browser, browse to
  • go to system / advanced
  • go to command scripts and enter ifconfig de0 down (it’s deZERO, not deo)
  • then create an entry for ifconfig de0 up
  • end result should look like this
  • and reboot, (if you need to add a new virtual disk to your vm, now is the time)
  • after the reboot login again to the webinterface and go to disks & management.
  • click on add disk
  • make sure you use ZFS
  • and click on apply changes. note, everytime you can apply changes, please do so.
  • go to disks & ZFS
  • now go to pools & virtual device
  • add a virtual device like this
  • now go to management
  • and add it like this
  • now go to services & iSCSI Target
  • under portal we’ll need to add a portal (defaults will do in this test environment).
  • now go to Initiators, again defaults will do for this test environment (ANY)
  • don’t forget to hit to enable the iSCSI service (disabled by default)
  • now it’s time to create an extent. important thing is that you specify a file where you mounted your ZFS volume, not a folder
  • ok, now add a target, and refer it to the extent
  • in the end you will get something like this 🙂
  • now go to your w2k8 test VM, and see if you can find the iSCSI drives using the built in iSCSI initiator
  • and add the disks to your cluster!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s