How to Connect FreeNAS iSCSI Disks to VMware vSphere 4 (ESXi 4)

Connect FreeNAS iSCSI Disks VMware vSphere 4Having a setup like a data center including VMware vSpehre 4 (ESXi 4) server, NAS (Network Access Storage), iSCSI disks on your home PC is wonderful way for learning.  You can experiment all at your home PC before go to production environment.  In this article I show you how to connect FreeeNAS iSCSI disks to VMware vSphere 4 (ESXi 4) Server.

For testing purpose with VMware ESXi4 server and iSCSI disks, we can’t buy physical NAS or disturb existing production NAS. So, FreeNAS and VMware workstation are good option to achieve this requirement.  I used VMware vSphere 4, FreeNAS and Windows 2008 R2 servers to install and test Exchange 2010 in cluster.

Here is the way how I achieved.

1)      Installed VMware vSphere 4 (ESXi4) on VMware workstation.

2)      Installed FreeNAS in VMware workstation.

3)      Installed three Windows 2008 R2 operating systems in ESXi4. ( one as domain controller and two for Exchange cluster)

4)      Connected FreeNAS iSCSI disks to VMware ESXi4 and created Windows 2008 R2 clusters.

Sounds good isn’t it? I have done these all with my home computer.

In this article I show you how to connect FreeNAS iSCSI disks as storage to VMware ESXi 4 vSphere server.

Follow the steps.

1)      Install and configure VMware vSphere 4 (ESXi4) server. Read more here about steps.

2)      Install and configure FreeNAS iSCSI disks in VMware workstation or any other networked computer. Make sure VMware vSphere and FreeNAS can communicate via network. Read more here about configuring iSCSI disks in FreeNAS.

In this example, I created 20GB iSCSI disk in FreeNAS and my final iSCSI setup screen shows as below.

Connect FreeNAS iSCSI Disks VMware vSphere 4

3)      Now connect ESXi4 server by vSphere 4 client. Go to configuration tab.

Connect FreeNAS iSCSI Disks VMware vSphere 4

4)      Go to storage Adapters option. Don’t go to storage now, select Add storage and try to add Disk/LUN. Nothing will show up in next screen till you enable iSCSI adapter in Storage Adapters. So, Click on Storage Adapters and go to next screen.

5)      Click on iSCSI Software Adapter and click properties as shown below.

Connect FreeNAS iSCSI Disks VMware vSphere 4

6)      By default iSCSI adapter is disabled in VMware vSphere (ESXi4) server. Press Configure button and select Enable Press OK.

Connect FreeNAS iSCSI Disks VMware vSphere 4

7)      Now again select iSCSI adapter and go to properties. After  you enabled iSCSI adapter name would have changed.

datastore vmware

Go to ‘Dynamic Discovery’ tab of the Properties. Press Add button.

8)      In ‘iSCSI Server’ type your FreeNAS server address where you setup FreeNAS iSCSI disks.

iscsiserver_address

9)      Once successfully added, go to ‘Static Discovery’ tab and make sure it detected the FreeNAS iSCSI disk.

static_discovery

10)   It may ask to rescan adapter, click yes. Now you can see the FreeNAS iSCSI disk listed under devices.

iscsidisk_details

11)   So far, we have setup the VMware vSphere (ESXi4) server to detect FreeNAS iSCSI disk through its software adapter. Still the iSCSI disk is not added as storage for ESXi4 server. To add this iSCSI disk as vSphere storage go to Storage option under configuration. (Shown in step -3). Click on Add storage as shown below.

add_storage

12)   Select Disk/LUN and press Next.  Now FreeNAS iSCSI disk will be appeared. Select it and click Next. Following message will appear once successfully added.

current_disk

13)   Give a name for datastore and click Next.

14)   Next screen for formatting, other than any special requirement leave the default block size and enable maximum size. Press Next.

15)   Here we go, it’s done. Final display shows the data store details. We successfully added FreeNAS iSCSI disks to VMware vSphere (ESXi4) data center. Click Finish.

16)   Now the FreeNAS iSCSi disk is listed under vSphere 4 datastore where you can work as normal datastore.

Connect FreeNAS iSCSI Disks VMware vSphere 4

I’m sure these steps will be helpful to add FreeNAS or any other iSCSI disks to VMware vSphere ( ESXi 4) server. Don’t forget to take snapshot of ESXi 4 before and after these steps.

Let me know if you face a problem with these methods, and if this is useful just drop a comment.

You can check following posts if you are interested.

1)      How to setup Windows 2008 R2 Cluster in VMware workstation with FreeNAS iSCSI disks.

2)      How to install VMware vSphere 4 (ESXi4) Server in VMware workstation 7 in Windows 7

3)      How to connect FreeNAS iSCSI disks to Windows 7

4)      How to install and configure FreeNAS in VMware workstation.

Comments

  1. says

    Thanks for your articles on how to get a free NAS up and running within VMWare. Really appreciate it, I’m working on Exchange 2007 clustering FE/BE configuration and then moving on to Exchange 2010 in the same fashion. This is really helpful. I want to send a pingback to you from my site as well, this is really good information.

    • says

      @Jason,
      Thanks for your comment.
      With the same method I managed to install Exchange 2010 on Cluster with FreeNAS. It’s cool, isn’t?
      I love pingbacks.

  2. Byron Musoni says

    I really liked the article. It helped me add an iscsi target disk to my ESXi 4 servers.

  3. Renato Sampaio says

    I also really liked the article. Now I have job to do this weekend.

    I would say thanks Dinesh,

    Renato from Brazil.

  4. GET says

    Thanks for the article, but got question. As you mentioned in your article “Installed three Windows 2008 R2 operating systems in ESXi4. ( one as domain controller and two for Exchange cluster)”. Nested VM doesn’t allow x64bit OS like 2008 R2. How did you install 2008 R2 inside ESXi4 and inside VMware workstation?

  5. Lynx says

    You could even run FreeNAS as VM on the ESXi vSphere Host itself. Give all disk space to the FreeNAS server and provide the disk space back to ESXi using iSCSI :)
    This way you need only one machine and can take advantage of ZFS and file system snapshots on the datastore.

  6. jose says

    Hello,

    The material is really good but I have some issues to finish this works. Currently, we have an FreeNAS and vsphere 4.1. and I create a LUN 2TB on the FreeNAS but I have an error on the step “12) Select Disk/LUN and press Next.” .

    The error is “Error adding a datastore in VMware ESXi 4.1 – Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi failed”.

    How can solve this error?.

    Thanks