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 http://ip.free.nas.x
  • 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
    06-ifconfig1
  • end result should look like this
    07-ifconfigcomplete
  • 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.
    08-diskmanagement1
  • click on add disk
    08-diskmanagement2
  • make sure you use ZFS
    08-diskmanagement3
  • and click on apply changes. note, everytime you can apply changes, please do so.
    08-diskmanagement4
  • go to disks & ZFS
    09-ZFS1
  • now go to pools & virtual device
    09-ZFS2
  • add a virtual device like this
    09-zfs3
  • now go to management
    09-zfs4
  • and add it like this
    09-zfs5
  • now go to services & iSCSI Target
    10-ISCSI1
  • under portal we’ll need to add a portal (defaults will do in this test environment).
    10-ISCSI3
  • now go to Initiators, again defaults will do for this test environment (ANY)
    10-ISCSI4
  • don’t forget to hit to enable the iSCSI service (disabled by default)
    10-ISCSI5
  • 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
    10-ISCSI6
  • ok, now add a target, and refer it to the extent
    10-ISCSI7
  • in the end you will get something like this 🙂
    10-ISCSI8
  • now go to your w2k8 test VM, and see if you can find the iSCSI drives using the built in iSCSI initiator
    11-connectdisks1
    11-connectdisks2
  • and add the disks to your cluster!
    12-clustermanager
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s