How to share windows with virtual machine linux

  
        

Virtual machine linux and widows host file sharing

Using virtual machine shared folder function

Using vmware(vmware workstation 5) shared folders function to implement vmware host and ghost File transfer, no network related settings, no network protocol, 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, please refer to vmware help Setting up shared folders.

1. Install vmtools for linux:

Select VM >install VMware tools...

in the vmware workstation program menu. Select VM >removable in the vmware workstation program menu. Devices >CD-ROM >Edit >USE ISO Image (choose linux.iso in the vmware installation directory)

Start linux on the guest computer and execute: mkdir /mnt/cdrom mount /dev/cdrom /Mnt/cdrom (vmtools installation files are placed in the vmware virtual cdrom, you must first mount this CD-ROM drive to find the installation file) cd /mnt/cdrom tar -zxvf VMwareTools-5.5.3-34685.tar.gz /tmp Extract the installation files to /tmp)

cd /tmp/vmware-tools-distrib ./vmware-install.pl

(Execute the vwware installation script, this script is written in perl)

Here, the installer asks a series of questions such as where to install the file and how to set the resolution. In most cases, installing the default configuration vmware tools will work, so press each question here. Enter the default configuration.

After installation, vmware will add a vmhgfs module to the kernel, you can use lsmod to view

2. Set the host computer shared directory:

in the ghost computer Switch to the windows desktop, select VM>Settings>Options>Shared Folders

in the vmware workstation program menu, click the “add” button at the bottom right of the dialog box, click “Next”

Enter the name of the shared directory in the text box "name" (the directory name entered here will display the same directory name in the ghost system of the ghost computer), assuming share_file; fill in the host in the "host folder" The directory that the windows system wants to share in the computer, assuming D:\\share and then click Finish

The next dialog box is to choose the sharing method: Enable this share means that the share is valid for a long time, and the directory can be read and written. The Read-only mode means that the share is valid for a long time, and the directory is read-only. The Disable after this session mode means that the share will be invalid after the next ghost computer is shut down or suspended. Under normal circumstances, select Enable this share and then click “Complete 

Since then, the shared folder has been set up

3.Use of shared folder directory

Switch to ghost computer Linux system, execute: cd /mnt/hgfs ls

You can see the directory of share_file, and you can use cp and other instructions to achieve windows to linux, linux to windows read and write operations

Tip: If your shared folder is built on the desktop of the Windows host, you may not see it when you run cd /mnt/hgfs ls on the Linux terminal. It is blank. At this time, you change the path to D drive or other disk. The root directory is OK, pay attention to the folder is not to have special characters such as spaces, this problem has also plagued me for a long time

4.Notes

Add a shared in the vmware software The folder or the version of the parameters of the shared folder is effective immediately, which means that you can immediately see the newly added shared directory and experience the parameter changes in the ghost computer's Linux system.

Conclusion: Write this The purpose of the article is to reduce the CU linux version on vmware ho The st/ghost computer shared file problem novice repeats the question and other brothers' repeated answers, making the layout more introductory. In addition, I think that most of the questions answered by ftp, samba or even nfs (nfs can be implemented on Windows with microsoft service for Unix), using shared folder method with vmware is better than using network protocol to achieve file transfer. It is much more convenient, and for beginners, copying files with the cp command is much simpler than using the ftp and smbmount commands.

After the virtual linux share is set correctly, what is blank after running cd /mnt/hgfs ls Nothing is going on?

My host is windows xp, linux installed in vmware6.0, installed vmware tools, and VM>Settings>Options>Shared Folders added share_redhat on windows desktop, always enabled But when the cd /mnt/hgfs ls is running on the linux terminal, nothing appears, blank, what is going on? ?

A: There may be a relationship between the paths. You should create a shared directory in the root directory of the D drive. Do not have special characters such as Chinese characters and spaces. Try it

Copyright © Windows knowledge All Rights Reserved