Establish NFS between virtual machine and Development Box for file transmission
HOST: Windows 7 flagship Edition
Virtual Machine: RHEL6.2
Development Box: CBT-SuperIOT)
Environment preparation:
In fact, when building nfs, the most important thing is to build the environment of the host and Virtual Machine. If you do not pay attention to it, nfs mounting will fail.
Host:
Disable all anti-virus software; disable the firewall; disconnect the wireless network and disable the wireless network (this is very important). If you really feel that the experiment is lonely, you can enable wireless Internet access after the connection, this is okay;
Virtual Machine (firewall ):
Disable the firewall (how to close the firewall, a lot of Internet traffic );
Virtual Machine (nfs configuration ):
File configuration method: vi/etc/exports;
Note:
/Home/share is the folder you want to share. * It indicates that all network segments can be used. (During embedded development, network security is usually not concerned, so this is acceptable ), the following are the read and write permissions, and the last one is the buffer to update and write in real time.
Network IP Configuration:
Note that the IP address of the Virtual Machine and the IP address of the Development Box are in an IP network segment. For example, if the virtual machine is 192.168.0.40 and the Development Box is 192.168.0.41.
Mounting nfs: (used to transfer files between virtual machines and Development boxes)
Command: [cpp] mount-t nfs-o nolock, rsize = 4096, wsize = 4096 192.168.0.10:/home/share/mnt/share
The command is to share all the files in the/home/share (usually virtual machines) Directory of the host with the IP address 192.168.0.10 to/mnt/share (usually in the Development Box ), when you put the file under/home/share, you can see it under/mnt/share and can use it (provided that you have granted permissions)