FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

VMware Workstation iSCSI Target

UPDATE- Read more here on setting up windows 2008 R2 cluster in VMware workstation using this iSCSI disks.

VMware is one of the coolest virtualization software. It supports most of the operating systems as guest operating system. Microsoft Server operating systems such as windows 2008 and windows 2008 R2 also can be installed in VMware workstation. Here I’m going to show how you can install FreeNAS  in VMware workstation as iSCSI target disks for your host and guest operating systems. This method will be used to install and configure MS Windows 2008 or Windows 2008 R2 cluster in VMware workstation.

What is NAS (Network Access Storage)?

Physically NAS is a hardware device with hard drives, and its accessible via network port.  In production environment there are famous NAS brands, such as,

HP
Synology
iomega

These NAS devices support iSCSI, which is required for cluster and high availability setup for servers.  But for the testing purpose in VMware we can’t have expensing physical NAS devices to configure cluster ot high availability servers in VMware. So, there is some free open source NAS software where you can use a computer as NAS. These free storage virtualization software make your computer hard disk as network access storage and allow other clients to access the disk directly through network.

I found these two free NAS softwares can be installed in computer and make NAS.

Openfiler
FreeNAS

This article explains how you can install FreeNAS on VMware workstation virtual machine to enable iSCSI target disks. Why I avoided Openfiler is, because of we will be using this NAS for Windows 2008 or Windows 2008 R2 server clusters. Openfiler doesn’t support SCSI-3 persistent reservation disks which is required for Windows 2008 and windows 2008 R2 server clusters but FreeNAS supports SCSI-3 persistent reservation disks.

How to Install FreeNAS on VMware workstation?

1)      Download the stable FreeNAS live CD ISO file here. It’s just 75MB ISO file.

2)      Create a virtual machine in VMware workstation, with following configuration.

Guest Operating System – Other – FreeBSD
Maximum disk size – 2GB

Memory – 2GB

Processor – 1 or 2 ( it doesn’t matter)
Network Adapter – Which ever work with your client computers.

VMware Workstation iSCSI Target

VMware Workstation iSCSI Target

3)      Select the downloaded FreeNAS ISO file under ISO image file in CD/DVD settings, and boot  the virtual machine with CD drive as first boot device.

4)      Boot the system with first option ( default)

VMware Workstation iSCSI Target

5)      If the virtual machine settings and downloaded file is correct, then you next screen will the below one. That’s it, NAS operating is loaded and ready to use.

VMware Workstation iSCSI Target

You can see the network address on NAS which will be given by VMware DHCP. Since this is Live CD version, its running from CD and RAM only. When you boot the NAS operating next time, it will disappear. So we have install it permanently on the virtual machine hard disk. It can be installed on external devices also, including flash device and USB drives.

6)      To install FreeNAS permanently on hard drive, type number 9 and press enter in above screen.

7)      Select the first option in first screen and press OK.

VMware Workstation iSCSI Target

8)      Press OK for warning/instruction message.

9)      Installation media will be your virtual machine CD drive where we mounted the ISO file. Press OK in the next screen.

10)   Select the 2GB hard disk we created during the virtual machine setup. Once we installed FreeNAS on this hard disk, then it cannot be used for create volumes or share data. So how to create disks for cluster or as iSCSI targets. Do not worry; we will add hard disks later to virtual machine in live.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

11)   Confirmation message will be shown as below after the installation succeeded.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

12)   Shutdown the system by pressing number 8. Then un mount the installation ISO file under CD/DVD drive, then start the FreeNAS virtual machine.

13)   Now you can’t see the number 9 option. Type number 2 and press enter to change the IP address of FreeNAS network virtualization software.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

14)   Select ‘No’ for DHCP option, give IPv4 address, you can select the Subnet mask by typing 24 or 16 or 8 in the next screen. Gateway, DNS and IPv6 are optional setup as per your requirements.

15)   One network settings confirmation message will be shown as below with accessible address.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

Installation of NAS on VMware workstation and network setups is done. Now, interesting part; configuring disks, volumes and LUNs in your Network Access Storage (NAS).

16)   Access the above address in internet explorer from other client computer. You will be getting login screen for FreeNAS.

User Name is – admin

Password is – freenas

FreeNAS user name and password can be reset in console setup by selecting number 3.

storage virtualization

17)   Welcome screen will give the information of NAS. Still no disks configured in your NAS.

storage virtualization

18)   Let’s add the disks to FreeNAS now.  Just for example we will add two disks. One with 512MB for quorum disk and other one 10GB for data share.

19)   Add the above hard disks to FreeBSD virtual machine where we installed FreeNAS. You do not need to shutdown the FreeNAS. It can be added when it’s working. I’m assuming you know how to add additional hard disks to a virtual machine is VMware. (Select SCSI disk type, better select ‘Allocate disk space now’ to improve the performance.)

20)   To add a disk in NAS, Click on Disks on the menu and select management. Click + sign at right side in next screen.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

21)   Select the newly added disk to virtual machine from drop down box. Lets add our quorum disk 512MB.

storage virtualization

You can give any description also for your reference. Since we are preparing NAS on VMware workstation as iSCSI target for Windows 2008 server cluster, select ZFS Storage pool device in file system as shown above. Press Add.

22)   Every time after any changes in FreeNAS you have press Apply changes button. Press the button in next screen.

storage virtualization

23)   Once the disk added successfully, the below screen can be seen.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

24)   Go to Disks in main menu and select ZFS.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

25)   Click on Virtual devices in next screen menu and Press + sign at right side. Give a name, leave the type as Stripe, and select the disk under devices. Then apply changes.

storage virtualization

26)   Click on Management tab next to Virtual Device in same screen. Give a name; leave others options blanks (you can add description). Press Add and Apply.

storage virtualization

27)   Now go to iSCSI Targets in Services (main menu)

virtualization software

28)   Enable the check box at right side and press save and restart button. It will start the iSCSI service in your FreeNAS virtual machine.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

29)   Click on portals tab. It will pick up your FreeNAS IP address with 3260 port number. Do not change anything here.  Just press add and apply changes buttons.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

(I’m writing this article from two computers, so IP address of my FreeNAS is different than installation and configuration, ignore it)

30)   Now click on initiators tab and leave the all settings as it is and press add, apply changes.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

31)   No go back to Targets tab and press + at right side under Extend. Press browse button as shown below.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

32)   It will bring the pool you created as a directory. Click on it and press OK button at top right side.

FreeNAS iSCSI Disks in VMware Workstation for MS Cluster

33)   You have to type a name for the extending disk. In this example I have typed ‘ quorum’ after the selection. It better to give slightly lesser the actual size. That’s why I have given 500 MB.

virtualization software

Press add and apply changes.

34)   To add the iSCSI target and LUNs in NAS, click on + mark at the right side under target in targets. Give a name for target, make sure Read/Write is selected under flags. Under LUNs, select the extended disk you created in earlier step. Leave the other settings and press add, apply changes.

virtualization software

35)   iSCSI target in your NAS VMware workstation settings will be appeared as below if all setup are correct.

virtualization software

Other clients including Windows 2008 server and windows 2008 R2 servers looking for iSCSI disks will be finding the disks in the name mentioned above.

Repeat the same steps to add disks to FreeNAS and configure NAS  iSCSI targets in VMware workstation.

I will be updating soon about how to do windows 2008 R2 cluster in VMware workstation using this iSCSI targets.

NAS in VMware Workstation as iSCSI Target - Download the FreeNAS now.

  • Share/Bookmark

Related Articles

You can leave a response, or trackback from your own site.

17 Responses to “FreeNAS iSCSI Disks in VMware Workstation for MS Cluster”

  1. Srujan Mandalapu says:

    Really good blog, this is what I was looking for, It will be appreciated if you post /mail using this iscsi in windows 2008 r2.

    looking forward for your posts.

  2. Edmund says:

    Hi, I am using FreeNAS 0.7 Khasadar (revision 4919) and everytime I try and create a target I get Error Code 1 following your instructions. Is this a bug in this version? It only happens right at that step when I create a target. Also, I am using this on ESXi 4 so I don’t know if that will be an issue.

    Thanks,

    Edmund

  3. Dinesh says:

    I don’t think using on ESXi will be an issue. Better give little less size (512 MB to 500MB) when you allocate target disk. I don’t think it will be bug, because I use the same version. I can try if you send the screen shot of error, I would suggest, just for testing install and configure outside ESXi.
    Good luck lets us know what happened.

  4. Karthik M says:

    Hi Dinesh,

    The article is just great .
    When i followed ur steps everything was perfect execpt when t tried to do the 31st step(Coniguring extender and target).iam not able to save the changes and i get error code 1…in step 32 when u say ” It will bring the pool you created as a directory. Click on it and press OK button at top right side” what do u mean by that..i dont see any pool in the parent directory..kindly explain me on this..thank u

  5. Roy says:

    I’m having the same problem as Edmund. I’m running freenas in a VM with 4 virtual disks in raid 5. Everything goes well until i create the target. I also get the “Error: The changes could not be applied (error code 1). The portal is working and i can connect to it with an initiator but the target kills the service and brings the portal down.
    Allocating less disk space did not work for me.

    I’m going to test it tomorrow on another PC. This is driving me nuts..

  6. Roy says:

    Extra info from the log:

    istgt[3873]: istgt_lu.c:1223:istgt_lu_add_unit: ***ERROR*** LU1: LUN0: format error
    istgt[3873]: istgt_lu.c:1473:istgt_lu_init: ***ERROR*** lu_add_unit() failed
    istgt[3873]: istgt.c:1247:main: ***ERROR*** istgt_lu_init() failed
    root: Failed to restart service iscsi_target

    Too bad it doesn’t help me that much. :-o

  7. Dinesh says:

    I’m also getting the same error in latest version FreeNAS 0.7 (Khasadar). But here I used earlier version FreeNAS 0.7RC1 (Sardaukar). No major changes between both versions.
    Download FreeNAS 0.7RC1 (Sardaukar) version at
    http://www.softpedia.com/get/UNIX/Networking/Server-Applications/FreeNAS.shtml
    it must be a bug in FreeNAS 0.7 (Khasadar) version, or different way to create SCSI-3 persistent targets.
    I will check & update you all. But Windows 2008 R2 cluster working fine with this setup.

  8. [...] how to setup SCSI-3 persistent reservation cluster disks in VMware workstation? I already wrote an article on setting up SCSI-3 persistent reservation cluster  iSCSI disks in VMware workstation using FreeNAS. Before continue reading this post, please read my previous [...]

  9. theo says:

    I also had this issue with FreeNAS 0.7 (Khasadar) but I downloaded FreeNAS 0.7RC1 (Sardaukar) and it worked like a charm. Very useful article. Thanks.

  10. Edmund says:

    I have just finished creating the ISCSI targets under FreeNAS 0.7RC1 (Sardaukar)and agree this may be a bug in version 0.7 Khasadar (revision 4919.

  11. Hugh Perkins says:

    Dinesh, this article is awesome. Really easy to follow the instructions. Nice work!

  12. aoyama says:

    Hi,

    It’s nice post.

    >>LUN0: format error

    I provide some fixes.
    Please check iSCSI target updater (binary upgrade) in this thread:
    http://sourceforge.net/apps/phpbb/freenas/viewtopic.php?f=53&t=4854&start=20#p24519

  13. Romashkarom says:

    Splendid!, excellent!

  14. [...] how to setup SCSI-3 persistent reservation cluster disks in VMware workstation? I already wrote an article on setting up SCSI-3 persistent reservation cluster  iSCSI disks in VMware workstation using FreeNAS. Before continue reading this post, please read my previous [...]

  15. [...] No-9 option. Installation with additional steps and configuring IP address to FreeNAS are already covered in NAS in VMware, please read [...]

  16. Tranthom says:

    Hi folks.

    I completed all the steps from A to Z but when I’m trying to add the Iscsi into the VM host’s config via vsphere (click on CONFIGURATION , then STORAGE in the middle, then ADD STORAGE on upper right corner, then DICK/LUN option is checked, click NEXT, and then BAM!!! nothing shows up.

    I did ALL that was in the article exactly by the book (except IPs and that I gave more significant names to me and my environement wich shoudn’t cause any trouble so far)

    FreeNas version / revision:
    FreeBSD 7.2-RELEASE-p6 (revision 199506)
    0.7.1 Shere (revision 5024)

    any hints on what’s going wrong?

  17. Dinesh says:

    Hi Tranthom,
    You must check this post to connect FreeNAS iSCSI disks to vSphere,
    http://www.sysprobs.com/connect-freenas-iscsi-disks-vmware-vsphere-4-esxi4

Leave a Reply

Compare cell phone plans and deals | Thanks to Best CD Rates, Conveyancing in London and Registry Software