Shared Folder between vmwarevm and host

Source: Internet
Author: User

Here, we will only introduce that the host is windows, and the ghost is set in Linux. If the ghost is windows, see setting up shared folders in the help of VMware.

1. Install vmtools for Linux:
Choose VM> install VMware Tools... from the VMware Workstation program menu...

Choose VM> removable devices> CD-ROM> Edit> use ISO image from the VMware Workstation program menu (select Linux. ISO in the VMware installation directory)
Start Linux on the guest computer and execute:
Mkdir/mnt/CDROM
Mount/dev/CDROM/mnt/CDROM (the vmtools Installation File is placed in the VMWare virtual cdrom. First, you must mount the optical drive to find the Installation File)
CD/mnt/CDROM
Tar-zxvf VMwareTools-5.5.3-34685.tar.gz/tmp (unzip the installation file to/tmp)

CD/tmp/vmware-tools-distrib
/Vmware-install.pl
(Run the vwware installation script, which is written in Perl)
Here, the installer will ask a series of questions, such as the location of the installation file and the resolution setting. In most cases, the installation of the default VMware Tools configuration can work normally, click the Enter key to select the default configuration for each problem.

After the installation, VMWare will add a vmhgfs module to the kernel. You can use lsmod to view

2. Set the directory shared by the host computer:
Switch to Windows desktop in ghost computer, and choose VM> Settings> Options> shared folders from the VMware Workstation program menu.

Click "add" in the lower-right corner of the dialog box and click "Next"

Enter the name of the shared directory in the text box "name" (the directory name entered here will be displayed in the Linux System of the ghost computer with the same directory name), for example, pai_file; in "host folder", enter the directory to be shared by the Windows System in host computer. Assume It is D: \ share and click Finish.

In the next dialog box, select the sharing mode: Enable this share indicates that the sharing is valid for a long time and the directory can be read and written; read-only means that the sharing is valid for a long time and the directory is read-only; disable after this session means that the sharing will expire after the ghost computer is shut down or suspended next time. Generally, select enable this share and click "finish"

Since then, shared folder settings have been completed

3. Use of shared folder directory
Switch to the Linux System of the ghost computer and run:
CD/mnt/HGFS
Ls
You can see the cmd_file directory and use commands such as CP to perform read and write operations from windows to Linux and from Linux to Windows.

4. Notes
Adding a shared folder in VMware software or performing a version of the shared folder parameter immediately takes effect, that is to say, you can immediately see the newly added shared directory in the Linux System of the ghost computer and experience the parameter changes.
Conclusion: The purpose of this article is to reduce the number of new users who repeatedly ask questions about the shared files of VMware Host/ghost computer on Cu Linux and the repeated answers from other brothers, so that the layout is more informative. In addition, I think most of the answers to this question are implemented by using FTP, Samba, and NFS (NFS can be implemented by installing Microsoft Service for UNIX on Windows, it is much easier to use the shared folder method provided by VMware than to use the network protocol for file transfer. For Beginners, copying files using the CP command is much easier than using the FTP and smbmount commands.

<! -------------------- Cute split line -------------------->

During execution, I encountered the problem of what is the location of the directory of C header files that match your running.

Press enter and find the following solution on the Internet.

1. Run CD/lib/modules/'uname-R'/build/include/Linux
If no error message is displayed, run PS: uname-R to view the kernel version.

'Uname-R' indicates the version number of the running uname-R.

2. Just do two soft connections. The specific method is to run the following two commands:
Sudo ln-S ../generated/Autoconf. h
Sudo ln-S ../generated/utsrelease. h
These two commands associate vmwaretools with the correct kernel header file location.

3. Execute sudo./vmware-install.pl again

Http://www.fuxiang90.me /? P = 201 welcome and criticism from my independent blog website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.