VMware Communities
desilva
Contributor
Contributor

Mounting an NFS filesystem on VM

Hi,

My VM is a Linux machine (kernel 2.6.9-67.0.4.ELsmp; NAT mode networking in Fusion). I need to mount a filesystem which is available as an nfs mount on the physical network but I seem to be seeing a port problem ...

If I do

mount -o ro,soft,intr myServer:/filesystem /mountpoint

I see the error

mount: myServer:/filesystem failed, reason given by server: Permission denied

Looking at the nfs server, I see

mountd\[14087\]: refused mount request from (my-VM's-Hostname) for /filesystem (/filesystem): illegal port 62089

I have tried adding port= to the mount command options but the problem remains. Has anyone succeeded in getting this to work or have suggestions on how to configure NAT to allow nfs clients to access external servers ?

Thanks in advance for any help !

regards,

Asoka

Tags (3)
11 Replies
dwight
Enthusiast
Enthusiast

NFS is difficult to get working through a firewalled or natted connection. Is it possible to just use a bridged connection or some protocol other than NFS?






RHCE, VCP

Blog: http://computing.dwighthubbard.info

RHCE, VCP Blog: http://computing.dwighthubbard.info
0 Kudos
dp_fusion
Enthusiast
Enthusiast

Is the NFS server running on Linux and if so is the insecure option enabled in the /etc/exports file on the server?

desilva
Contributor
Contributor

Hi,

Thanks for the fast response ... unfortunately it needs to be nfs.

regards,

Asoka

0 Kudos
dp_fusion
Enthusiast
Enthusiast

NFS is working fine here with NAT and bridged SuSE 10.3 to both Solaris 10 and Red Hat Linux AS servers. But I had to relax security on the Linux server.

0 Kudos
desilva
Contributor
Contributor

Hi,

Yes, it is Linux (Scientific Linux 4.5 to be precise) and the insecure

option is not enabled. I'll try that tomorrow when I am on the local

network to see if that makes a difference.

Thanks for the pointer !

regards,

Asoka

0 Kudos
dp_fusion
Enthusiast
Enthusiast

When you tried to mount with the port option e.g. "mount -o port=2049 host:/share /mountpoint" what was your error?

0 Kudos
desilva
Contributor
Contributor

Thanks dp_fusion !

... with the insecure option in the nfs server export, it works. This

resolves one (the main) problem that I can control ... unfortunately

there are other servers that are beyond my control and I cannot export

insecure. So is there a way to configure the NAT table on VMWare to

get the correct port ranges instead of doing this on the server side ?

To answer your other question; if I use -o port=2049, I see the same

error message:

mount: server:/share failed, reason given by server: Permission denied

and on the server log:

mountd\[14087\]: refused mount request from (my host) for /share (/

share): illegal port 49235

(It looks like this is being ignored ... strange)

regards,

Asoka

0 Kudos
admin
Immortal
Immortal

See /Library/Application Support/VMware Fusion/vmnet8/nat.conf

You'll probably have to do `/Library/Application Support/VMware Fusion/boot.sh --restart` after any edits

WoodyZ
Immortal
Immortal

See /Library/Application Support/VMware Fusion/vmnet8/nat.conf

You'll probably have to do `/Library/Application Support/VMware Fusion/boot.sh --restart` after any edits

You need to use sudo or the restart will fail... Smiley Happy

sudo "/Library/Application Support/VMware Fusion/boot.sh" --restart

0 Kudos
desilva
Contributor
Contributor

Thanks etung, WoodyZ and dp_fusion !

So, for anyone else who need to know, this is what I did:

shutdown all VM and quit Fusion first.

sudo -s

cd /Library/Application\ Support/VMWare\ Fusion/vmnet8

cp nat.conf nat.conf.20080229

chmod +w nat.conf

emacs nat.conf

add the following lines at the end of the file:

#***********************

\[privilegedUDP\]

autodetect=1

\[privilegedTCP\]

autodetect=1

#***********************

chmod -w nat.conf

"/Library/Application Support/VMware Fusion/boot.sh" --restart

exit

and I am able to mount the nfs share (without the insecure option on

the server or specifying port=)

regards,

Asoka

ryantodd
Contributor
Contributor

Thanks all for the tips and steps. Huge help -- now I can work the rest of the day!

0 Kudos