There are many ways to implement Windows host and Linux virtual machine file sharing, including the use of Samba file servers, and this article describes the Vmtools tools in VMware Virtual machine software for file sharing.
First, the environment
1, Host: Windows7
2. Virtual machine: CentOS6.7 (built by VMware)
Second, the realization process:
1. Set up a shared directory
Click VMware's Menu "Virtual machine", "Settings"
Select: "Options"-"Shared Folder"
Click on the "Add" button and select the shared folder to continue the next step.
Note: After adding a shared folder, remember to press OK to save the settings
2, put some files in the shared folder, do the test
Set up three folders to do the testing:
Perform a reboot command restart on a virtual machine
3. Load Vmtools via VMware: (equivalent to placing the system disk in the optical drive)
Click on VMware's menu item "Virtual machine", "Install VMware Tools (T)" option
4. Install Vmtools in the virtual machine:
Enter the shell:
(1) Mount Optical device:
If a device read-only prompt appears
Mount:block Device/dev/sr0 is write-protected, mounting read-only, don't care about it
(2) Enter/mnt directory, install Vmtools
cp cp VMwareTools-9.9.3-2759765. tar .gz /root #因为/mnt目录是只读的,所以无法解压,因此将它放到可写的目录下 cd /root tar -zxvf VMwareTools-9.9.3-2759765. tar .gz cd vmware-tools-distrib/ |
Run vmware-install.pl, and then return to
5. Enter the virtual machine/mnt directory:
Found a Hgfs directory, below a share directory, which is the shared directory we set
"Works" Using Vmtools for host windows and virtual machine Linux file sharing