In the VMware vSphere 5.1 lab on our laptops blog, we have used Linux SLES distro as our NFS server. In that blog I said it was easy to install and setup this Linux to be a NFS server for our lab. Before I show how easy it is, let me first say that there is better solutions for our external storage (beside the real external storage 🙂 ), such as OpenFiler. It supports more protocols, but it is by far more difficult to set up.
First let’s create our virtual machine. I won’t be showing all the steps here in graphics, but rather just list them because they are trivial. The most important ones will be shown as pictures. So, we should build our VM this way:
- select Custom (advanced) option for virtual machine configuration
- for the hardware compatibility, we select the most recent version
- we select I will install the operating system later
- then select the proper Linux version. In our case SUSE Linux Enterprise 11 64-bit
- select location and VM name
- for number of processors and cores we select 1/1
- we will give it a 2GB of RAM, although 1GB should be enough
- for network settings we leave defaults for now, but we will change this later
- I/O controller type – recommended
- virtual disk type – recommended
- we select Create a new virtual disk
- disk size – the more the better
- we accept the default disk name
- then we click Customize hardware and change two things:
First, we make sure that the second virtual network adapter belongs to the NFS network. In our lab this is 188.8.131.52/24 network represented by vmnet2 adapter:
Second, we need to select the SLES Linux ISO image as the source drive media for installation:
That’s all for VM settings. Now we power on this VM and begin our installation. First we select the Installation option:
We accept the EULA and click Next. We skip the Media Check by clicking Next. Then the New Installation option should be selected. The appropriate time zone should be selected and time should be adjusted. In the Installation Settings windows, we accept the defaults by hitting Install. Now it’s time for a tea. I’m drinking tea these days 🙂
After a tea break, we give a root password, then a host name and a domain name. Now it is a time for network setup. We should disable a firewall (this is a lab setup) and click Network interfaces to set up IP parameters:
By default, our network adapter is set up to receive the IP parameters from DHCP. This is not what we want, so we click Edit.
This is how our next window should be filled in:
Then we click Next.We verify our settings and click OK. Then click Next to proceed with the installation. After our settings have been applied, we should skip the Internet connection test. Because we don’t need the CA services on this machine, we skip this setup. For the Authentication method we leave the default of Local.
Now we create our ordinary user we will never use 🙂
The system configuration is being written …
We click Next and wait for a graphic card detection. We could use the defaults here. Same goes for the printer and the sound. Just click Next.
Finally, the installation is completed. We deselect the Clone This System for AutoYaST and hit Finish. A reboot takes place…
Now we login as a root user. We open the terminal window, create a folder /NFS and give everyone a full access. Might not be a best thing to do from a security point of view, but for a lab, will do:
mkdir /NFS && chmod 777 /NFS
We start YaST Control Center from Computer menu, click Network Services and then NFS Server. Some additional packages may might be required, so we just click Install:
Now we complete the NFS Server Configuration. We select to start the NFS server. If we haven’t disabled the firewall, we could select the option to allow the NFS traffic through. The ESXi 5.1 does not support NFS v4, so we deselect this option:
We click Add Directory and browse to the directory we created earlier. Then we specify Host Wild Card and Options and click OK. Now we see a familiar window from our original blog post:
We click Finish.
That’s it 🙂 We can now connect to our NFS share as described in our original blog.
Thanks for reading!