LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting Up NFS server with VMWare (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-nfs-server-with-vmware-428976/)

chanwcom 03-27-2006 09:15 AM

Setting Up NFS server with VMWare
 
Hi,

I'm a novice LINUX user. I installed Fedora 4 LINUX using VMWare.

The following shows my current configuration:

Host OS: Windows XP Professional
Guest OS: Fedora 4
VMWare Version: VMWare Workstation 5.5
Network Configuration: NAT.

I wanted to set up NFS and SSH severs using the above configuration. For the SSH server, I used port forwarding, and it seemed to be successful. (I forwarded TCP port 22)

But I could not make the NFS server work. I tried it by forwarding 2049 TCP/UDP, and 111 TCP ports, but it did not work.

So, could you tell me how I can resolve this problem with the NFS server? Or do you have any similar experiences?

Thanks very much!

acid_kewpie 03-27-2006 09:23 AM

I really really wouldn't recommend natting within vmware. if you're not actually natting to reach the net, don't do nat at all, give it a local network address.

pschaff 05-02-2006 08:02 AM

Quote:

Originally Posted by acid_kewpie
I really really wouldn't recommend natting within vmware. if you're not actually natting to reach the net, don't do nat at all, give it a local network address.

However, if you do need to use NAT (as in my case where I must pay a monthly fee for each IP address, but NAT is free) NFS can be made to work. The trick that worked for me was to get the server to allow the "insecure" ports that the VMware NAT wants to use by putting the correct entry in /etc/exports on the NFS server. Couldn't find the answer on the VMware site, but Petr Vandrovec (of vmware.any.any patch fame) gave a procedure elsewhere. (Can't post the URL as I'm too new a member. :mad: )

Example (for RedHat style distros) follows:

Let the NFS server name be "realserv", the filesystem to share be "/share", the VMware host machine be "realhost1", and the VMware virtual machine be "vm1". The physical machines have fixed addresses and both have entries in /etc/hosts on each machine - DNS resolvable names or numeric IP addresses/subnets should also work.

On realserv, /etc/exports contains:

/share realhost1(rw,async,insecure)

Run "exportfs -r" after modifying /etc/exports (assuming the nfs service was already running).

Or, showing a few more options:

/share realhost1(rw,no_root_squash,async,insecure) realhost2(rw,async,insecure) nonnat.my.net(rw,no_root_squash,async) 192.168.3.0/24(rw,async)

The no_root_squash parameter allows root access to the NFS share, otherwise root maps to nobody.nogroup. realhost1 and it's VM NATs have root access. realhost2 and its NATs do not. nonnat.my.net has root access but no NAT access. Machines on subnet 192.168.3.0/24 have normal user access but no NAT access.

Any firewall on realserv must be set up to allow access from all clients.

On realhost1 VMware guest vm1 is set up for NAT networking and can mount the share as follows:

# mkdir /share
# mount realserv:/share /share

Assuming success, can make it permanent by using the entry found in /etc/mtab to make a new entry in /etc/fstab, or set up autofs for automounts.

According to info on the VMware site, it should also be possible to fix the problem on the host machine in the NAT config by forcing the use of ports in the range 512-1023 that will make the server happy without the "insecure" parameter; howerver, the details were lacking and I have not yet been able to get that approach to work.

Phil


All times are GMT -5. The time now is 06:41 PM.