很多初次使用虚拟机配Linux的同志都为 在Linux下安装VMware Tools 而感到困惑,其实接触Linux久了就习惯了,这就是我们所谓的Windows依赖症,在中国尤为厉害!微软是不是有美国政府的干预才向中国投放盗版?我们无从知晓。我使用的是 VMware Workstation 6.5.1build126130 和 Ubuntu 8.10 桌面64位。

安装 VMware Tools 的步骤如下:

1.正常进入Linux,将安装文件解压缩到/home/你的用户名文件夹下/(这里我的用户名是kitt),所以我解压缩到/home/kitt/下。

2.点击左上角“Application”–>“附件”–>“终端”,出现如下提示,按我输入的做(红字部分)即可!其余的地方就回车(Enter)吧!有个分辨率需自选

To run a command as administrator (user “root”), use “sudo <command>”.
See “man sudo_root” for details.

kitt@kitt-64:~$ su root
Password:
root@kitt-64:/# cd /home/kitt/vmware-tools-distrib
root@kitt-64:/home/kitt/vmware-tools-distrib# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

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]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

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]

The installation of VMware Tools 7.8.4 build-126130 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]

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon:                                      done
Virtual Printing daemon:                                            done
None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes]

Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.27-7-generic/build/include]

Extracting the sources of the vmmemctl module.

Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vmmemctl-only/backdoorGcc64.o
CC [M]  /tmp/vmware-config0/vmmemctl-only/os.o
CC [M]  /tmp/vmware-config0/vmmemctl-only/vmballoon.o
LD [M]  /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
LD [M]  /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only’
The vmmemctl module loads perfectly into the running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes]

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vmhgfs-only/backdoor.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/backdoorGcc64.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/bdhandler.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/dentry.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/dir.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/file.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/filesystem.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/fsutil.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsEscapeLinux.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/inode.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/link.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/messageBackdoor.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/message.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/module.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/page.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/request.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/rpcout.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/staticEscape.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/stubs.o
CC [M]  /tmp/vmware-config0/vmhgfs-only/super.o
LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only’
The vmhgfs module loads perfectly into the running kernel.

None of the pre-built vmxnet modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmxnet module for
your system (you need to have a C compiler installed on your system)? [yes]

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmxnet-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vmxnet-only/vmxnet.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config0/vmxnet-only/vmxnet.mod.o
LD [M]  /tmp/vmware-config0/vmxnet-only/vmxnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vmxnet.ko ./../vmxnet.o
make: Leaving directory `/tmp/vmware-config0/vmxnet-only’
The vmxnet module loads perfectly into the running kernel.

update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
None of the pre-built vmblock modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmblock module
for your system (you need to have a C compiler installed on your system)?
[yes]

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.

make: Entering directory `/tmp/vmware-config0/vmblock-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vmblock-only/linux/block.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/control.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/dbllnklst.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/dentry.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/file.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/filesystem.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/inode.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/module.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/stubs.o
CC [M]  /tmp/vmware-config0/vmblock-only/linux/super.o
LD [M]  /tmp/vmware-config0/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config0/vmblock-only/vmblock.mod.o
LD [M]  /tmp/vmware-config0/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config0/vmblock-only’
The vmblock module loads perfectly into the running kernel.

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?
[no]
None of the pre-built vmci modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmci module for
your system (you need to have a C compiler installed on your system)? [yes]
Extracting the sources of the vmci module.

Building the vmci module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmci-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vmci-only/kernelStubsLinux.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciDatagram.o
CC [M]  /tmp/vmware-config0/vmci-only/vmci_drv.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciEvent.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciGuestDs.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciGuestKernelIf.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciKernelIf.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciProcess.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciQueuePair.o
CC [M]  /tmp/vmware-config0/vmci-only/vmciUtil.o
LD [M]  /tmp/vmware-config0/vmci-only/vmci.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config0/vmci-only/vmci.mod.o
LD [M]  /tmp/vmware-config0/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-config0/vmci-only’
The vmci module loads perfectly into the running kernel.

None of the pre-built vsock modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vsock module for
your system (you need to have a C compiler installed on your system)? [yes]
Extracting the sources of the vsock module.

Building the vsock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vsock-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M]  /tmp/vmware-config0/vsock-only/linux/af_vsock.o
CC [M]  /tmp/vmware-config0/vsock-only/linux/driverLog.o
CC [M]  /tmp/vmware-config0/vsock-only/linux/util.o
/tmp/vmware-config0/vsock-only/linux/util.c: In function ‘VSockVmciLogPkt’:
/tmp/vmware-config0/vsock-only/linux/util.c:157: warning: format not a string literal and no format arguments
CC [M]  /tmp/vmware-config0/vsock-only/linux/vsockAddr.o
LD [M]  /tmp/vmware-config0/vsock-only/vsock.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: “VMCIDatagram_CreateHnd” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIDatagram_DestroyHnd” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIEvent_Subscribe” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCI_DeviceGet” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIMemcpyFromQueueV” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIQueuePair_Detach” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCI_GetContextID” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIDatagram_Send” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIQueuePair_Alloc” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIEvent_Unsubscribe” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: “VMCIMemcpyToQueueV” [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
CC      /tmp/vmware-config0/vsock-only/vsock.mod.o
LD [M]  /tmp/vmware-config0/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-config0/vsock-only’
Unable to make a vsock module that can be loaded in the running kernel:
insmod: error inserting ‘/tmp/vmware-config0/vsock.o’: -1 Unknown symbol in module
There is probably a slight difference in the kernel configuration between the
set of C header files you specified and your running kernel.  You may want to
rebuild a kernel based on that directory, or specify another directory.

The VM communication interface socket family is used in conjunction with the VM
communication interface to provide a new communication path among guests and
host.  The rest of this software provided by VMware Tools is designed to work
independently of this feature.  If you wish to have the VSOCK feature  you can
install the driver by running vmware-config-tools.pl again after making sure
that gcc, binutils, make and the kernel sources for your running kernel are
installed on your machine. These packages are available on your distribution’s
installation CD.
[ Press the Enter key to continue.]

Detected X.org version 7.4.2.

No drivers for X.org version: 7.4.2.

Please choose one of the following display sizes that X will start with (1 –
29):

[1]  “320×200”
[2]  “320×240”
[3]  “400×300”
[4]  “512×384”
[5]  “640×400”
[6]  “640×480”
[7]  “720×480”
[8]  “800×480”
[9]  “854×480”
[10]  “720×576”
[11]  “800×600”
[12]< “1024×768”
[13]  “1280×720”
[14]  “1280×768”
[15]  “1152×864”
[16]  “1280×800”
[17]  “1366×768”
[18]  “1280×960”
[19]  “1440×900”
[20]  “1280×1024”
[21]  “1400×1050”
[22]  “1680×1050”
[23]  “1600×1200”
[24]  “1920×1080”
[25]  “1920×1200”
[26]  “1920×1440”
[27]  “2048×1536”
[28]  “2560×1600”
[29]  “2560×1920”
Please enter a number between 1 and 29:

[12] 16

X.Org X Server 1.5.2
Release Date: 10 October 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-16-server x86_64 Ubuntu
Current Operating System: Linux kitt-64 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 x86_64
Build Date: 24 October 2008  09:06:49AM
xorg-server 2:1.5.2-2ubuntu3 (buildd@crested.buildd)
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: “/tmp/vmware-config1/XF86ConfigLog.6210”, Time: Mon Mar  2 11:15:03 2009
(++) Using config file: “/tmp/vmware-config1/XF86Config.6210”

X is running fine with the new config file.

Checking acpi hot plug                                              done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration:                                   done
Guest filesystem driver:                                            done
Mounting HGFS shares:                                              failed
Guest memory manager:                                               done
VM communication interface:                                         done
Blocking file system:                                               done
Guest operating system daemon:                                      done
Virtual Printing daemon:                                            done

The configuration of VMware Tools 7.8.4 build-126130 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.

If the virtual printer feature is enabled, you will need to restart the CUPS
service to make use of this feature.

Enjoy,

–the VMware team

root@kitt-64:/home/kitt/vmware-tools-distrib# shutdown -r now