Installing a simple NFS server for use with VMware ESXi

OK, just a very quick post here, This week I installed my new ESXi host so I can run a few test VM’s etc and wanted to easily mount installation media (eg. ISO’s) from my home server (running Ubuntu Server 12.04) so I thought I’d quickly set-up an NFS (Network File Server) as VMware ESXi supports these ‘datastores’ so here are the simple steps for anyone wanting to achieve the same kind of setup:-

Firstly I create a new folder on my Ubuntu server where the actual data is going to to be stored:-

 mkdir -p /data/nfs/install_media

Next we need to install The NFS server software, so we’ll use aptitude to do that like so:-

 apt-get install nfs-kernel-server

We now need to edit the /etc/exports file, so using nano we’ll add a new line to the /etc/exports file like so:-

 /data/nfs/install_media 172.25.87.4(rw,async,no_subtree_check)

^ Replace the IP address with your ESXi’s server’s IP address, (in my case my ESXi server’s IP address is 172.25.87.4) (No space between the IP address and the options.)

Now we should run the following command to re-export our new configuration (this should also be run each time you add any additional configs/shares to the /etc/exports file!)

 exportfs -ra

…and now we’ll also just restart the NFS server daemon like so..

 service nfs-kernel-server restart

You should now be able to add a new NFS data store from your ESXi server to your remote server 🙂

 

One reply on “Installing a simple NFS server for use with VMware ESXi”