Introduction: The author of these days based on the CentOS 7 lite version According to a virtual machine, sad that there is no graphical interface, but it is very necessary to share the work of files, the host and the virtual machine to achieve file sharing, this article will describe how to do this.
VMware menus follow VMware Tools
The first is to install tools based on VMware:
After the installation is completed on the interface, you need to mount the tool inside the virtual machine to implement the shared directory settings.
Settings inside a VM virtual machine
The instruction list is as follows:
Mkdir/mnt/cdrom
Mount/dev/cdrom/mnt/cdrom # hangs in optical drive settings
Then enter/mnt/cdrom to see the installed VMware installation files. By default, it is read-only and does not require writing, and it is common practice to copy it to another location for decompression and installation, where we will copy it to the current user directory:
Tar zxvf VMwareTools.xxxx.tar.gz #这个依据具体的版本而略有差异
Cd/cdrom/vmware-tools-distrib
From the installation file that you can see vmware-install.pl, execute the following command:
./vmware-install.pl
The assumption here is that the Perl language needs to be installed because the installation script is written in the Perl language:
Yum Install Perl #安装perl
When you see the following message, congratulations, the VMware Tool installation is successful.
In the virtual machine, cut to/mnt/cdrom can see a more Hgfs folder, the File System and window under the folder is shared, the shared file is in this directory.
Problems encountered during installation
From the above information can be found, during the installation process, did not find the corresponding Kernel-header files, these are Kernel-header development package, so need to base on the current Linux kernel to choose the right Kernel-header Development class library.
Yum Install kernel-headers-(uname? R)KerNel? DEvel? (uname-r)-y
Based on the above command, you can dynamically obtain the current version of the Linux kernel and install its development package automatically.
Then the problem will be resolved automatically.
Resources
http://www.woaipu.com/shops/zuzhuan/61406
http://nanning.xjwy.cn/f/bencandy.php?fid=43&id=117777
http://nanning.xjwy.cn/f/bencandy.php?fid=43&id=117890
http://nanning.xjwy.cn/f/bencandy.php?fid=43&id=117994
http://nanning.xjwy.cn/f/bencandy.php?fid=43&id=118376
Installation guide for VMware shared files