Posted on Thursday, 4th June 2009 by Heiko
Shared storage is required for features like VMotion, Fault Tolerance and many other great features VMware ESX 4.0 has to offer to make our virtual life as easy as possible. Also my future testing with Citrix XenServer should profit (read: will be a lot easier) from using shared storage. After searching through the virtualization community websites and blogs available, I found many people using Openfiler since it’s free and performs quite well. After downloading the x86_64 ISO image, connecting it to a new VM (settings: Guest OS: Other Linux (64-bit), VM Version 7, 1 vCPU, 1 GB memory and 2 hard disks (1x 2 GB for the Openfiler install and 1x 250 GB storage) on a LSI Logic SAS controller), booting the VM, it is time to install Openfiler. This post describes the install of an Openfiler server on a VMware ESX 4.0 host (managed by VMware vCenter Server), and will be used to serve as a shared storage datastore among several VMware ESX 4.0 hosts.
Installing Openfiler is a “Next-Next-Reboot” install as described over here. Just keep in mind NOT to test the CD media before installation. Just choose “Skip”:

After rebooting, your Openfiler is ready to be configured. Login to the Openfiler system by pointing your browser to the address of the Openfiler host:
Management Interface: https://<ip_of_openfiler_host>:446
Administrator Username: openfiler
Administrator Password: password
Once you are logged in you have to follow the following steps to create an NFS share:
- First of all change the admin password on the Accounts tab with on the right side of the screen the Admin Password option.
- Go to the Volumes tab
- Click on the Block Devices option on the right
- Click on the device you want to use for setting up the NFS share (/dev/sdb in my case)
- Scroll down to the Create a partition in /dev/sdx part
- Set the Partition Type to Physical Volume and press “Create”
- After the volume is created, go to Add Volume and start creating a new volume group by defining a name and adding the physical volume to the volume group.
- The following step is to go to Shares where we will create a new filesystem volume by clicking the link.
- Again scroll down the page to the Create a volume in “volumegroup” and add a volume by entering a name, description, size and filesystem type and push Create. Settings I used: nfsshare, Volume for NFS share, maximum size (slider far to the right) and Ext3.
- Go to the Shares tab and click on the share-volume to add a share/subfolder. When created click on the folder to make it a share, by clicking Make Share
- After clicking you will be brought to the Edit share <share location> screen with the Share Access Control Mode.
- Set the Share Access Control Mode to Public guest access and press update.
- The share isn’t available yet because there’s no Network Acces Configuration configured yet. Therefor go to the System tab and scroll down.
- At the Network Access Configuration we have to enter the name and ip of the VMware ESX 4.0 host and a subnet mask. Leave the “Type” to Share. Remember: the ip to enter is the ip of the VMkernel Port network that’s needed for the NFS share to be added as a datastore in VMware ESX 4.0. I’ll get to that in a bit.
- After this go to the Shares tab and scroll down to the Host Access Configuration part, and set the radiobutton under NFS to RW (Read/Write). Click update and we’re ready to add the share to the VMware ESX 4.0 host!

As mentioned before it is needed to setup a VMKernel network before NFS or iSCSI datastores can be added to a VMware ESX host. How to setup:
- Connect to the VMware vCenter Server with the VMware vSphere Client and go to the configuration tab of the VMware ESX 4.0 host on which you want to add the datastore.
- Go to Networking and see if there’s already a VMkernel configured. If so, note down the ip and use it with step 14 of the Openfiler installation steps above.
- If there is no VMkernel network configured, press the Add… button and add a VMkernel network with your own settings (static ip-address or DHCP, VMotion and Fault Tolerance enabled or not, etc.)
Once the VMkernel is configured, it is possible to add the NFS datastore by the following steps:
- Connect to the VMware vCenter Server with the VMware vSphere Client and go to the configuration tab of the VMware ESX 4.0 host on which you want to add the datastore.
- Go to Storage and click on the Add storage… button on the right side of the screen.
- Choose Network File System, enter the ip of the Openfiler host, the path of the share (usually something like: /mnt/sharename1/sharename2/foldername) and the name you want to give the datastore.
- After pressing Next and Finish the datastore must have been added to your list of datastores.
Hint: when you experience problems adding the NFS share as a datastore to the VMware ESX 4.0 host, it’s advisable to dive into the logs made by Openfiler. I use PuTTY Tray (an improved version of PuTTY) to login to the SSHD of the Openfiler host (username: root, password: <admin_pass_step1>) and look for errors by tailing the messages log:
tail /var/log/messages
or if I’m unsure what the exact share location on the Openfiler host is, I look for it in the exports file:
cat /etc/exports
These commands can’t ruin your setup since they are used to read only, but only use them when you’re feeling comfortable using a command-line interface.
Related posts:
- Running a HA / DRS ESX 4 cluster on a single HP ML110 G5
- VMware vCenter Mobile Access (vCMA) for VMware vCenter Server
- Installing a Citrix Access Gateway on VMware Workstation
Posted in Tech | Comments (11)





(5)
(2)
(0)
June 4th, 2009 at 19:41 Sander Daems(Quote)
Nette post, hier gingen bij mij ook wat dingen verkeerd. Bedankt!
June 4th, 2009 at 20:32 Heiko(Quote)
Hallo Sander, leuk dat je reageert! Bij mij ging het bij stap 15 de eerste keer fout, omdat het “Host Access Configuration” gedeelte ergens helemaal onderaan de pagina stond, ergens waar ik het niet verwachtte.
June 5th, 2009 at
[...] change I quickly decided to go with NFS. I described the steps I took in my previous blogpost with Free shared NAS/SAN storage using Openfiler 2.3 NFS on VMware ESX 4.0 as [...]
June 9th, 2009 at 09:37 Tim(Quote)
I have heard something about StarWind iSCSI target as an alternative to the Openfiler, as I am not too familiar with Linux. Do you have any feedback/comments on that that you could share?
June 11th, 2009 at 07:34 Heiko(Quote)
Tim,
to be honest I only used Openfiler for my shared storage needs so far, but Arne Fokkema of ICTfreak.nl wrote an article about the use of StarWind, just some days ago: StarWind – Free iSCSI Target. Perhaps you can use it to get an idea what solution to choose for your personal needs.
June 25th, 2009 at 00:20 pow(Quote)
really nice howto, all works fine. I’ve been struggling a bit with LDAP but left it behind.
Only thing now is when I enable smb shares in openfiler I have to (in windows) enter the IP of openfiler to find the share. It doesn’t show up in network for some reason…
July 8th, 2009 at 15:06 dex(Quote)
Thanks a lot.
I followed your guide but the “Host Access Configuration” didn’t show up in the Shares section.
I enabled the LDAP but nothing happened.
Please help me!
July 9th, 2009 at 13:10 Heiko(Quote)
dex,
to be honest, I need more information to help you. When following my guide the Host Access Configuration should pop up. The only thing I could think of what could be happening is when you’re using FireFox, it seems that some configuration options are placed to the bottom of the page, and with bottom I really mean down the page. When this doesn’t help, please contact me. I’ll try to help whenever I have some spare time.
July 9th, 2009 at 13:12 Heiko(Quote)
The openfiler box is a member of the same domain/workgroup? They use the same gateway? No DNS issues?
June 2nd, 2010 at 08:39 damir(Quote)
I have this error on my esx 4 server:
” Error during the configuration of the host: NFS Error: Unable to Mount filesytem: The NFS server does not support MOUNT version 3 over TCP ”
July 8th, 2010 at 13:49 Abrar Ahmed(Quote)
Thank you for your post. I configured this and it works fine.