Nonsense not to say, directly into the steps;
1. Network connectivity
The virtual machine, the Development Board, the host all must be in the same local area network, the Development Board may use the network cable Direct link in the host, also may through the link router (if the connection is convenient point on the router, can surf the net); If your host is connected to a wireless network, the virtual machine and Both the host and the Development Board are set to the same LAN and may not ping. You may be able to ping the virtual machine and the host (bridging mode), but your development Board Ping does not connect the host and virtual machine, because in fact, they are three not in the same LAN, Although you set the IP and gateway in the same local area network (192.168.1.1), but its essence is the virtual machine and host on the same LAN. The solution is to first disable the host's wireless network, and then restart the virtual Machine Network (service network Restar), so that three systems can ping each other. Finally you start the wireless network, it will not affect the Development Board and virtual machine between the network, but in this case, the virtual machine can not Sisu network.
The following are all operating on the server, which is also the virtual machine:
2. Install the Package
First let the virtual machine link to the external network (do not know how to configure the virtual machine network can see this linux network Configuration command); Install two packages: Yum install-y nfs-utils Portmap;
Start in turn:
Service Portmap start; If the error portmap:unrecognized service is displayed (cannot find the service), try service Rpcbind start; This is because the name of the package has changed;
Service NFS Start;
Service Nfslock start, NFS Lock services started
3. Modify the Script
Vim/etc/exports
/home/nfs * (Sync,ro,no_root_squash);/home/nfs represents the directory to be shared with the Development Board (client); * Indicates that all hosts can share this directory (you can specify an IP segment share), followed by synchronization, read and Write permissions, And do not log in with root, the specific can check the information, here only say the simplest configuration;
Exportfs-ra can make the configuration in the/etc/exports file effective; exportfs-v Displays the output Directory of NFS on the server
The following actions are on the client side, which is the Development Board:
4. Direct Mount Directory
Mount-t NFS 192.168.1.150:/home/nfs/mnt/share; mount the/home/nfs directory in the virtual machine to the/mnt/share directory in the Development Board;
If the resulting
"Svc:failed to register LOCKDV1 RPC service (errno 5).
Lockd_up:makesock failed, error=-5 "error, you can try the following command;
Mount-t Nfs-o nolock 192.168.1.150:/home/nfs/mnt/share
Uninstall is the same as other uninstall commands: Umount/mnt/share (note to exit the directory first, otherwise: Device or resource busy error);
Server for NFS Simple configuration