On the Ubuntu Server:
Step 1: Install the NFS Server in Ubuntu
- Run the following command:
sudo apt-get install nfs-kernel nfs-common portmap
- make sure 127.0.0.1 in the /etc/default/portmap file is commented out. If it is, comment it out...save the file...restart portmap using this command:
/etc/init.d/portmap restart
Step 2: Configure NFS Server
- Edit the /etc/exports file and add the following line:
/share_directory 10.1.1.1/16(rw,no_root_squash,async) - Restart NFS Server with the following command:
sudo /etc/init.d/nfs-kernel-server restart
On VMWare System:
Step 1: Open the Firewall ports for NFS client.
- Run the following command to open the nfsClient port on the VMWare firewall/
esxcfg-firewall -e nfsClient
Step 2: Start Portmap and NFS on VMWare ESX 3.5
If you don't run the first one, you can't mount the nfs drive. If you don't run the second one, you can't copy files.
service portmap start
service nfs start
Step 3: Mount the NFS Share on VMWare Server:
- Make a directory for the mount point:
mdkir /mountnfsshare
- Edit the /etc/fstab adding the following line to automatically mount the nfs share:
server_ip_address_or_name:/shared_directory /local_mount_point nfs rsize=8192,wsize=8192,intr
- Mount the NFS file system:
mount -a or mount it manually using this command:
mount server_ip_address_or_name:/shared_directory /local_mount_point
This does not work on VSphere 4.0 ESXi.