Implementation of file sharing between vmwarevm ubuntu and the hard drive of the Main Operating System

Source: Internet
Author: User

Install vmware-tools to share files.
1. Load the linux. iso file in a virtual machine. Add the linux. iso file to Settings-Hardware-CD/IDE-Use iso image file. PS: This file can be found in the installation directory of VMware: \ Program Files \ VMware Workstation \ linux. iso
 
2. Start the VM to enter the/mnt/cdrom directory.
Cd/mnt/cdrom
 
3. Decompress VMware-tools * .tar.gz to tmp in the cdrom directory.
Cp VMware-tools * .tar.gz/tmp
Cd/tmp
Tar xzvf VMware-tools * .tar.gz
Cd vmware-tools-distrib
 
Is there a vmware-install.pl in the directory?
OK!
 
4. Run./vmware-install.pl
 
5. VMware-tools has been installed successfully.
Cd/mnt
If you see a hgfs directory, it indicates that the installation is successful. Next we will explain how to set up sharing. This part is simpler.
Do you remember the above operations in the VM menu? Yes! Next, select the setting sub-item in the VM menu, and then select Options. Do you see Shared Folders in the left half of the Form? If you have not set it before, it should be Disabled.
Select always enable, select Add, and select the directory to be shared with the customer's Linux.
All work has been completed. You will see the added directory under/mnt/hgfs. Write a file to the specified share folders in windows, which can be seen in the Linux client. The file written in Linux can also be seen and modified in the windows system.
 
 
PS: Things are always not as smooth as you think. During step 4, I encountered the problem of What is the location of the directory of C header files that match your running.
Problem description: Run./vmware-install.pl, always press enter key OK, when the following prompt appears, you have to be careful.
Before running VMware Tools for the first time, you need to configure it
Invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
This program to invoke the command for you now? [Yes]
 
Before you can compile modules, you need to have the following installed...
 
Make
Gcc
Kernel headers of the running kernel
 
 
The above prompt indicates that to install vmware tools, you must first install gcc and the kernel header file.
Searching for GCC...
Detected GCC binary at "/usr/bin/gcc ".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Wocould you like to change it? [No]
 
 
Problem: it cannot find the path of my kernel header file
Searching for a valid kernel header path...
The path "" is not valid.
Wocould you like to change it? [Yes]
 
What is the location of the directory of C header files that match your running
Kernel?
Prompt me to enter the path of the kernel header file
 
 
This problem may occur in two cases:
First, if you have not installed the kernel header file, you must first install kervel-deve
Another issue is vmware. In fact, the kernel header has been installed, but it is not correctly identified.
The solution is as follows:
1. Run cd/lib/modules/'uname-R'/build/include/linux"
If no error message is displayed,
 
2. Just do two soft connections. The specific method is to run the following two commands:
Ln-s ../generated/autoconf. h
Ln-s ../generated/utsrelease. h
These two commands associate vmwaretools with the correct kernel header file location.

3. Execute again./vmware-install.pl, as shown below: vmware has been able to find a valid kernel header file path, followed by continuing to press enter.
 
Searching for a valid kernel header path...
Detected the kernel headers of the running kernel
"/Lib/modules/2.6.35-24-generic/build/include ".
The path "/lib/modules/2.6.35-24-generic/build/include" appears to be a valid
Path to the kernel headers of the running kernel.
Wocould you like to change it? [No]
 
4. The following prompt indicates that vmware-tools has been installed successfully!
Creating a new initrd boot image for the kernel.
Update-initramfs: Generating/boot/initrd. img-2.6.35-24-generic
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Paravirtual SCSI module: done
Guest filesystem driver: done
Mounting HGFS shares: done
Guest memory manager: done
VM communication interface: done
Blocking file system: done
File system sync driver: done
Guest operating system daemon: done
Virtual Printing daemon: done
 
The configuration of VMware Tools 8.1.3 build-203739 for Linux for this running
Kernel completed successfully.
 
You must restart your X session before any mouse or graphics changes take
Effect.
 
You can now run VMware Tools by invoking the following command:
"/Usr/bin/vmware-toolbox" during an X server session.
 
To enable advanced X features (e.g., guest resolution fit, drag and drop, and
File and text copy/paste), you will need to do one (or more) of the following:
1. Manually start/usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.
 
Enjoy,
 
-- The VMware team
 
 
 
Solved the problem successfully! Files can be shared between ubuntu and the host.

Author: Tianya Emy"
 

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.