虽然大一入学的时候就装了虚拟机,但是一直装不下VMware Tools,配置环境的时候只能在虚拟机重新敲网址复制粘贴命令或者手敲,要是忘记切换sudo还要再敲一遍…最近又要投入linux的怀抱了,今晚又找了篇教程,结果居然成功了!
教程地址如下:https://www.cnblogs.com/huangjianxin/p/6343881.html
环境:虚拟机 ubuntu14.04
步骤1、点击虚拟机菜单栏里的VMware Tools图标
进入该文件夹内后,找到一个叫VMwareTools-XX.X.X-XXXXXXX.tar.gz的文件,复制到另一个文件内,我的系统显示的是VMwareTools-10.2.0-7259539.tar.gz,我将其复制到/home目录下。
2、用tar解压该文件
root@XXXX:/home/username# tar -zxf VMwareTools-10.2.0-7259539.tar.gz
解压后出现vmware-tools-distrib文件夹,里面有一个vmware-install.pl文件。
3、root权限执行vmware-install.pl文件
sudo ./vmware-install.pl
此时开始进行安装,
以下是安装过程(可以复制粘贴之后太爽了):
root@XXXX:/home/username/vmware-tools-distrib# sudo ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends
using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more
information.
Do you still want to proceed with this installation? [yes] y
INPUT: [y]
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes] y
INPUT: [y]
Uninstalling the tar installation of VMware Tools.
Stopping services for vmware-tools
vmware-tools stop/waiting
Stopping services for vmware-tools-thinprint
vmware-tools-thinprint stop/waiting
File /etc/pulse/default.pa is backed up to /etc/pulse/default.pa.old.1.
update-initramfs: Generating /boot/initrd.img-3.13.0-32-generic
The removal of VMware Tools 9.9.0 build-2304977 for Linux completed
successfully.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr/bin]
INPUT: [/usr/bin] default
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
INPUT: [/etc] default
What is the directory that contains the init scripts?
[/etc/init.d]
INPUT: [/etc/init.d] default
In which directory do you want to install the daemon files?
[/usr/sbin]
INPUT: [/usr/sbin] default
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
INPUT: [/usr/lib/vmware-tools] default
The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] y
INPUT: [y]
yes
In which directory do you want to install the common agent library files?
[/usr/lib]
INPUT: [yes]
The path "yes" is a relative path. Please enter an absolute path.
In which directory do you want to install the common agent library files?
[/usr/lib]
INPUT: [/usr/lib] default
In which directory do you want to install the common agent transient files?
[/var/lib]
INPUT: [/var/lib] default
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
INPUT: [/usr/share/doc/vmware-tools] default
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes] yes
INPUT: [yes]
The installation of VMware Tools 10.2.0 build-7259539 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] yes
INPUT: [yes]
Initializing...
Making sure services for VMware Tools are stopped.
The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.
The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.
The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment. Do you wish
to enable this feature? [yes] yes
INPUT: [yes]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
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.
Would you like to change it? [no] no
INPUT: [no]
Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.13.0-32-generic/build/include".
The path "/lib/modules/3.13.0-32-generic/build/include" appears to be a valid
path to the 3.13.0-32-generic kernel headers.
Would you like to change it? [no] no
INPUT: [no]
Using kernel build system.
make: Entering directory `/tmp/modconfig-FULub8/vmhgfs-only'
/usr/bin/make -C /lib/modules/3.13.0-32-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-32-generic'
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/backdoor.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/backdoorGcc64.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/bdhandler.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/cpName.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/cpNameLite.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/dentry.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/dir.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/file.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/filesystem.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/fsutil.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/hgfsBd.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/hgfsEscape.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/inode.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/link.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/message.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/module.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/page.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/request.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/rpcout.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/stubs.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/super.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/transport.o
CC [M] /tmp/modconfig-FULub8/vmhgfs-only/kernelStubsLinux.o
LD [M] /tmp/modconfig-FULub8/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-FULub8/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/modconfig-FULub8/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-32-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-FULub8/vmhgfs-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-FULub8/vmhgfs-only'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/modconfig-FULub8/vmhgfs-only'
The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment. Do you wish to enable this feature?
[yes] yes
INPUT: [yes]
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no] yes
INPUT: [yes]
Thinprint provides driver-free printing. Do you wish to enable this feature?
[yes] yes
INPUT: [yes]
Disabling timer-based audio scheduling in pulseaudio.
Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes] yes
INPUT: [yes]
Do you want to enable Common Agent (caf)? [yes] yes
INPUT: [yes]
Detected X server version 1.15.1
Distribution provided drivers for Xorg X server are used.
Skipping X configuration because X drivers are not included.
Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.13.0-32-generic
Generating the key and certificate files.
Successfully generated the key and certificate files.
vmware-tools-thinprint start/running
vmware-tools start/running
The configuration of VMware Tools 10.2.0 build-7259539 for Linux for this
running kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
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
3. Restart your X session.
Enjoy,
--the VMware team
Found VMware Tools CDROM mounted at /media/arururururu/VMware Tools. Ejecting
device /dev/sr0 ...
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ...
//自此就安装完毕啦
这里是官网的介绍,VMware Tools可以实现在主机和虚拟机间复制粘贴功能,支持文件共享,同时可支持自由拖拽的功能,鼠标也可在虚拟机与主机之前自由移动(不用再按ctrl+alt),且虚拟机屏幕也可实现全屏化。