Linux 下安装VMTools(RPM 方式)

 

 

最近开始学习 Linux, VMWare 上装完系统之后,在主机和虚拟机之间切换实在麻烦,最主要的没法在系统之间共享资源,只有先安装 VMTools 工具了,在网上找了几种方法,都说得很简单,一般都是通过解压缩文件安装的,但是看 VMTools 里面提供了 rpm 格式的安装文件,为什么不试一下呢?特将试验结果记录下来,供以后学习。


方法概述:以 root 账户登陆虚拟机系统(必须本地登陆,远程登陆可以安装 ,但是不能配置),选择虚拟机 -Install VMware Tools, 此时虚拟机会弹出提示框,显示已加载的 linux VMware Tools 软件。将相应软件( /media/VMware Tools/* Copy tmp 目录,用 rpm 命令安装,然后按照提示一直点下去即可,系统一般有默认的选项,没有的直接回车即可。下面是详细过程(在红帽企业 Linux.5.4 Fedora11 环境测试成功):

[root@localhost ~]# cd /tmp
[root@localhost tmp]# mkdir soft
[root@localhost tmp]# cd soft
[root@localhost soft]# mkdir vmtools
[root@localhost soft]# cd /media
[root@localhost media]# ls
VMware Tools
[root@localhost media]# cd VMware/ Tools/
[root@localhost VMware Tools]# ls
manifest.txt                       VMwareTools-7.8.4-126130.tar.gz
VMwareTools-7.8.4-126130.i386.rpm
[root@localhost VMware Tools]# cp * /tmp/soft/vmtools
[root@localhost VMware Tools]# cd /tmp/soft/vmtools
[root@localhost vmtools]# ls
manifest.txt                       VMwareTools-7.8.4-126130.tar.gz
VMwareTools-7.8.4-126130.i386.rpm
[root@localhost vmtools]# rpm -ivh VMwareTools-7.8.4-126130.i386.rpm
Preparing...                ###########################################

[100%]
   1:VMwareTools            ###########################################

[100%]

The installation of VMware Tools 7.8.4 for Linux completed successfully.
You can decide to remove this software from your system at any time by
invoking the following command: "rpm -e VMwareTools".

Before running VMware Tools for the first time, you need to
configure it for your running kernel by invoking the
following command: "/usr/bin/vmware-config-tools.pl".

Enjoy,

    --the VMware team

[root@localhost vmtools]# /usr/bin/vmware-config-tools.pl

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                          [
确定 ]
   Virtual Printing daemon:                                [
确定 ]
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] 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.18-164.el5xen/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.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config0/vmmemctl-only/backdoorGcc32.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
CC      /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
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]

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.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config0/vmhgfs-only/backdoor.o
CC [M] /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.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
CC      /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
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]

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.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config0/vmxnet-only/vmxnet.o
In file included from /tmp/vmware-config0/vmxnet-only/vmxnet.c:39:
/tmp/vmware-config0/vmxnet-only/compat_netdevice.h:273:
错误: ‘struct

napi_struct’ 重定义
/tmp/vmware-config0/vmxnet-only/vmxnet.c: In function ‘vmxnet_probe_device

’:
/tmp/vmware-config0/vmxnet-only/vmxnet.c:993:
警告:当将一个指针转换为大小不

同的整数时给出警告
make[2]: *** [/tmp/vmware-config0/vmxnet-only/vmxnet.o]
错误 1
make[1]: *** [_module_/tmp/vmware-config0/vmxnet-only]
错误 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
make: *** [vmxnet.ko]
错误 2
make: Leaving directory `/tmp/vmware-config0/vmxnet-only'
Unable to build the vmxnet module.

The fast network device driver (vmxnet module) is used only for our fast
networking interface. The rest of the software provided by VMware Tools is
designed to work independently of this feature.
If you wish to have the fast network driver enabled, 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 Enter key to continue ]

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] yes

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmblock-only'
make -C /lib/modules/2.6.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config1/vmblock-only/linux/block.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/control.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/dbllnklst.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/dentry.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/file.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/filesystem.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/inode.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/module.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/stubs.o
CC [M] /tmp/vmware-config1/vmblock-only/linux/super.o
LD [M] /tmp/vmware-config1/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST
CC      /tmp/vmware-config1/vmblock-only/vmblock.mod.o
LD [M] /tmp/vmware-config1/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config1/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] 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]

yes

Extracting the sources of the vmci module.

Building the vmci module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmci-only'
make -C /lib/modules/2.6.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config1/vmci-only/kernelStubsLinux.o
CC [M] /tmp/vmware-config1/vmci-only/vmciDatagram.o
CC [M] /tmp/vmware-config1/vmci-only/vmci_drv.o
CC [M] /tmp/vmware-config1/vmci-only/vmciEvent.o
CC [M] /tmp/vmware-config1/vmci-only/vmciGuestDs.o
CC [M] /tmp/vmware-config1/vmci-only/vmciGuestKernelIf.o
CC [M] /tmp/vmware-config1/vmci-only/vmciKernelIf.o
CC [M] /tmp/vmware-config1/vmci-only/vmciProcess.o
CC [M] /tmp/vmware-config1/vmci-only/vmciQueuePair.o
CC [M] /tmp/vmware-config1/vmci-only/vmciUtil.o
LD [M] /tmp/vmware-config1/vmci-only/vmci.o
Building modules, stage 2.
MODPOST
CC      /tmp/vmware-config1/vmci-only/vmci.mod.o
LD [M] /tmp/vmware-config1/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-config1/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]

yes

Extracting the sources of the vsock module.

Building the vsock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vsock-only'
make -C /lib/modules/2.6.18-164.el5xen/build/include/.. SUBDIRS=$PWD

SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-config1/vsock-only/linux/af_vsock.o
CC [M] /tmp/vmware-config1/vsock-only/linux/driverLog.o
CC [M] /tmp/vmware-config1/vsock-only/linux/util.o
CC [M] /tmp/vmware-config1/vsock-only/linux/vsockAddr.o
LD [M] /tmp/vmware-config1/vsock-only/vsock.o
Building modules, stage 2.
MODPOST
WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIEvent_Subscribe" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCI_DeviceGet" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIMemcpyFromQueueV" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIQueuePair_Detach" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCI_GetContextID" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIDatagram_Send" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIQueuePair_Alloc" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIEvent_Unsubscribe" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
WARNING: "VMCIMemcpyToQueueV" [/tmp/vmware-config1/vsock-only/vsock.ko]

undefined!
CC      /tmp/vmware-config1/vsock-only/vsock.mod.o
LD [M] /tmp/vmware-config1/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-config1/vsock-only'
The vsock module loads perfectly into the running kernel.

Detected X.org version 7.1.


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

[1] "320x200"
[2] "320x240"
[3] "400x300"
[4] "512x384"
[5] "640x400"
[6] "640x480"
[7] "720x480"
[8] "800x480"
[9] "854x480"
[10] "720x576"
[11] "800x600"
[12]< "1024x768"
[13] "1280x720"
[14] "1280x768"
[15] "1152x864"
[16] "1280x800"
[17] "1366x768"
[18] "1280x960"
[19] "1440x900"
[20] "1280x1024"
[21] "1400x1050"
[22] "1680x1050"
[23] "1600x1200"
[24] "1920x1080"
[25] "1920x1200"
[26] "1920x1440"
[27] "2048x1536"
[28] "2560x1600"
[29] "2560x1920"
Please enter a number between 1 and 29:

[12] 12


X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-128.1.16.el5 i686 Red Hat, Inc.
Current Operating System: Linux localhost.localdomain 2.6.18-164.el5xen #1

SMP Tue Aug 18 16:06:30 EDT 2009 i686
Build Date: 22 July 2009
Build ID: xorg-x11-server 1.1.1-48.67.el5
        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.4318", Time: Mon Oct 5

17:59:31 2009
(++) Using config file: "/tmp/vmware-config1/XF86Config.4318"

X is running fine with the new config file.

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Multiple symbols for level 1/group 1 on key <I5F>
>                   Using XF86Sleep, ignoring XF86Standby
> Warning:          Symbol map for key <I5F> redefined
>                   Using last definition for conflicting fields
Errors from xkbcomp are not fatal to the X server
FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
   Checking acpi hot plug                                  [
确定 ]
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                       [
确定 ]
   Guest filesystem driver:                                [
确定 ]
   Mounting HGFS shares:                                   [
确定 ]
   Guest memory manager:                                   [
确定 ]
   VM communication interface:                             [
确定 ]
   VM communication interface socket family:               [
确定 ]
   Blocking file system:                                   [
确定 ]
   Guest operating system daemon:                          [
确定 ]
   Virtual Printing daemon:                                [
确定 ]

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@localhost vmtools]#

 

转至: http://hi.baidu.com/yuzhucu/blog/item/273923b08dbe755e082302fb.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值