How Windows shares with virtual machine Linux

Source: Internet
Author: User

virtual Machine Linux and widows hosts for file sharing

using the Shared Folders feature of a virtual machine

Use the Shared Folders feature under VMware Workstation 5 for file transfer between host and Ghost in VMware without any network-related settings, without using any network protocols, Host and Ghost can be Linux and Windows operating system, here only the host is Windows,ghost is the setting under Linux, if Ghost is windows, refer to the VMware Help setting up shared Folders

1. Install Vmtools for Linux:
Select VMware Workstation Program menu in VM >install VMware Tools ...

Select the VMware Workstation Program menu in VM >removable Devices >cd-rom >edit >use ISO Image (select VMware installation directory linux.iso)
To start Linux on the guest computer, execute:
Mkdir/mnt/cdrom
Mount/dev/cdrom/mnt/cdrom (vmtools installation file in VMware Virtual CDROM, first to mount the CD-ROM to find the installation files)
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
(Execute vwware installation script, this script is written in Perl)
Here, the installer asks a series of questions about the location of the installation file and the setting resolution, and in most cases, the installation of the default configuration of VMware Tools will work, so here's a default configuration for each issue by pressing the ENTER key.

After installation, VMware adds a Vmhgfs module to the kernel, which you can use Lsmod to view


2. Set the directory for the host computer share:
Switch to the Windows desktop in Ghost Computer, select the VMware Workstation Program menu vm>settings>options>shared Folders

Click the "Add" button at the bottom right of the dialog box and click "Next"

Enter the name of the shared directory in the text box "name" (the directory name filled in here will show the same directory name later in Ghost Computer's Linux system), assuming share_file; in the "Host folder", fill in the host Computer the directory that Windows systems want to share, assume D:\share and click Finish


The next dialog box is the option to share: Enable This share means that the share is valid for a long time, the directory can read and write; read-onThe Ly method refers to this shared long-term valid, directory-only read; Disable after this session means that the next time ghost computer is closed or suspended, the share will be invalidated. In general, select the Enable this share and then click "Done"

Since then, the shared folder has been set to complete


use of the 3.shared folder directory
Switch to Ghost computer's Linux system and execute:
Cd/mnt/hgfs
Ls
You can see the Share_file directory, and you can use commands such as CP to implement Windows to Linux,linux to Windows read and write operations.

Tip: If you share a folder based on the Windows host desktop, may run Cd/mnt/hgfs LS in the Linux terminal, nothing to see, is blank, then you change the path to D or other disk root directory on the line, note that the folder is best not to have spaces and other special characters appear, This problem has been bothering me for half a day.



4. precautions
Adding a shared folder or the parameters of a shared folder in the VMware software takes effect immediately, meaning that the newly added shared directory and the changes to the parameters can be seen instantly in the Ghost computer Linux system
Conclusion: The purpose of this article is to reduce the issue of the CU Linux version on the VMware host/ghost computer shared files of the novice repeat the question and the other brother repeated answers, so that the layout more brief. In addition, I think the answer to this question is mostly using Ftp,samba or even NFS (which can be achieved with Microsoft Service for UNIX on Windows), using VMware's own shared Folder mode is much more convenient than using a network protocol for file transfer, and it is much easier for novice users to copy files with the CP command than with FTP and Smbmount commands.

After the virtual Linux share is set up correctly, running Cd/mnt/hgfs ls is blank and nothing is going on?

My host is Windows XP, Linux in vmware6.0, installed VMware Tools,
and vm>settings>options>shared Folders added the share_redhat on the Windows desktop, always enabled,
But when the Linux terminal runs Cd/mnt/hgfs ls Nothing appears, blank, what is going on??

A: It is possible that the relationship between the path, you set up a shared directory in the D-Packing directory, directories do not have characters, spaces and other special characters, try

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.