How to map to a remote NFS directory from a VMware ESX 4 server.

I ran into this error while trying to mount a NFS directory on a remote server from my Vmware ESX4 server. My Vmware esx server is called esx4-server and the remote NFS server is called remote-server.
I executed the mount commant and got the below error.
[root@esx4-server /]# mount -t nfs remote-server:/home/andrew/mnt
mount.nfs: Input/output error

I then decided to use the -v (verbose) option for mount. This will list the mounting process in verbose, it is better for troubleshooting.
[root@esx4-server /]# mount -vt nfs remote-server:/home/andrew/mnt
mount: trying 192.20.66.88 prog 100003 vers 3 prot tcp port 2049
mount: trying 192.20.66.88 prog 100005 vers 3 prot udp port 32794
mount.nfs: Input/output error

I then checked the log files for more information, and below are the messages I saw.
[root@esx4-server /]# cat /var/log/messages
Oct 26 10:32:30 esx4-server vobd: Oct 26 10:32:30.936: 159470608100us: [esx.problem.vmfs.nfs.mount.connect.failed] Failed to mount to server 192.20.66.88 mount point /VMLibrary/. Error: Unable to connect to NFS server.
Oct 26 11:36:50 esx4-server kernel: [162970.448490] portmap: server localhost not responding, timed out
Oct 26 11:36:50 esx4-server kernel: [162970.453525] RPC: failed to contact portmap (errno -5).

From the log file I was able to determine that the pormap service was not started. It is required to map to a remote NFS directory. I then proceeded with starting the protmap service.
service portmap start

To esure that the service starts automatically when the server reboots use the below command.
chkconfig portmap on
You may also have to stop the firewall service on the esx server with the command service firewall stop. To prevent it from starting after a reboot, chkconfig firewall off.

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →