Posted on 2009-07-22 19:48
大源 阅读(1209)
评论(0) 编辑 收藏 引用 所属分类:
Linux
1、挂载VMware-Tools
2、准备好以下文件,
安装虚拟机和Linux后,要安装VMware-Tools时可能会出现的问题:
What is the location of the directory of C header files that match your running kernel
在终端里执行:
1rpm -ivh kernel-devel-2.6.18-8.el5.i686.rpm
2or
3rpm -ivh kernel-xen-devel-2.6.18-8.el5.i686.rpm
4#install package
5
6uname -r
7# running kernel
8
9rpm -q kernel-devel
10# installed kernel headers
其实只要安装以下文件即可:kernel-devel-2.6.18-8.el5.i686.rpm、kernel-xen-devel-2.6.18-8.el5.i686.rpm
上面的两个文件可以在Linux的安装盘上找到,进入根目录,然后进入文件名为Server的文件夹搜索即可
3、安装记录如下
1[root@localhost ~]# cd /software/
2[root@localhost software]# LS
3bash: LS: command not found
4[root@localhost software]# ls
5VMware-tools
6[root@localhost software]# cd VMware-tools/
7[root@localhost VMware-tools]# ls
8kernel-xen-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
9VMwareTools-6.0.0-45731.i386.rpm vmware-tools-distrib
10[root@localhost VMware-tools]# rpm -ivh kernel-xen-devel-2.6.18-8.el5.i686.rpm
11warning: kernel-xen-devel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
12Preparing ########################################### [100%]
13 1:kernel-xen-devel ########################################### [100%]
14[root@localhost VMware-tools]# uname -r
152.6.18-8.el5xen
16[root@localhost VMware-tools]# rpm -q kenel-devel
17package kenel-devel is not installed
18[root@localhost VMware-tools]# ls
19kernel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
20kernel-xen-devel-2.6.18-8.el5.i686.rpm vmware-tools-distrib
21VMwareTools-6.0.0-45731.i386.rpm
22[root@localhost VMware-tools]# rpm -ivh kernel-
23kernel-2.6.18-8.el5.i686.rpm
24kernel-xen-devel-2.6.18-8.el5.i686.rpm
25[root@localhost VMware-tools]# rpm -ivh kernel-2.6.18-8.el5.i686.rpm
26warning: kernel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
27Preparing ########################################### [100%]
28 1:kernel ########################################### [100%]
29[root@localhost VMware-tools]# uname -r
302.6.18-8.el5xen
31[root@localhost VMware-tools]# rpm -q kernel-devel
32package kernel-devel is not installed
33[root@localhost VMware-tools]# ls
34kernel-2.6.18-8.el5.i686.rpm kernel-xen-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
35kernel-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.i386.rpm vmware-tools-distrib
36[root@localhost VMware-tools]# rpm -ivh kernel-devel-2.6.18-8.el5.i686.rpm
37warning: kernel-devel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
38Preparing ########################################### [100%]
39 1:kernel-devel ########################################### [100%]
40[root@localhost VMware-tools]# uname -r
412.6.18-8.el5xen
42[root@localhost VMware-tools]# rpm -q kernel-devel
43kernel-devel-2.6.18-8.el5
44[root@localhost VMware-tools]# ls
45kernel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.i386.rpm
46kernel-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
47kernel-xen-devel-2.6.18-8.el5.i686.rpm vmware-tools-distrib
48[root@localhost VMware-tools]# cd vmware-tools-distrib/
49[root@localhost vmware-tools-distrib]# ls
50bin doc etc FILES INSTALL installer lib vmware-install.pl
51[root@localhost vmware-tools-distrib]# ./vmware-install.pl
52A previous installation of VMware Tools has been detected.
53
54The previous installation was made by the tar installer (version 4).
55
56Keeping the tar4 installer database format.
57
58Uninstalling the tar installation of VMware Tools.
59
60Stopping VMware Tools services in the virtual machine:
61 Guest operating system daemon: [确定]
62
63The removal of VMware Tools 6.0.0 build-45731 for Linux completed successfully.
64Thank you for having tried this software.
65
66Installing VMware Tools. This may take from several minutes to over an hour
67depending upon its size.
68
69In which directory do you want to install the binary files?
70[/usr/bin]
71
72What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
73[/etc/rc.d]
74
75What is the directory that contains the init scripts?
76[/etc/rc.d/init.d]
77
78In which directory do you want to install the daemon files?
79[/usr/sbin]
80
81In which directory do you want to install the library files?
82[/usr/lib/vmware-tools]
83
84The path "/usr/lib/vmware-tools" does not exist currently. This program is
85going to create it, including needed parent directories. Is this what you want?
86[yes]
87
88In which directory do you want to install the documentation files?
89[/usr/share/doc/vmware-tools]
90
91The path "/usr/share/doc/vmware-tools" does not exist currently. This program
92is going to create it, including needed parent directories. Is this what you
93want? [yes]
94
95The installation of VMware Tools 6.0.0 build-45731 for Linux completed
96successfully. You can decide to remove this software from your system at any
97time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
98
99Before running VMware Tools for the first time, you need to configure it by
100invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
101this program to invoke the command for you now? [yes]
102
103
104Stopping VMware Tools services in the virtual machine:
105 Guest operating system daemon: [确定]
106Trying to find a suitable vmmemctl module for your running kernel.
107
108None of the pre-built vmmemctl modules for VMware Tools is suitable for your
109running kernel. Do you want this program to try to build the vmmemctl module
110for your system (you need to have a C compiler installed on your system)?
111[yes]
112
113Using compiler "/usr/bin/gcc". Use environment variable CC to override.
114
115What is the location of the directory of C header files that match your running
116kernel? [/lib/modules/2.6.18-8.el5xen/build/include]
117
118Extracting the sources of the vmmemctl module.
119
120Building the vmmemctl module.
121
122Using 2.6.x kernel build system.
123make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
124make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
125make[1]: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
126 CC [M] /tmp/vmware-config0/vmmemctl-only/os.o
127 SHIPPED /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
128 LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
129 Building modules, stage 2.
130 MODPOST
131WARNING: could not find /tmp/vmware-config0/vmmemctl-only/.vmmemctl1.o.cmd for /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
132 CC /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
133 LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
134make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
135cp -f vmmemctl.ko ./../vmmemctl.o
136make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
137The module loads perfectly in the running kernel.
138
139Extracting the sources of the vmhgfs module.
140
141Building the vmhgfs module.
142
143Using 2.6.x kernel build system.
144make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
145make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
146make[1]: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
147 CC [M] /tmp/vmware-config0/vmhgfs-only/backdoor.o
148 CC [M] /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.o
149 CC [M] /tmp/vmware-config0/vmhgfs-only/bdhandler.o
150 CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
151 CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
152 CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
153 CC [M] /tmp/vmware-config0/vmhgfs-only/dbllnklst.o
154 CC [M] /tmp/vmware-config0/vmhgfs-only/dentry.o
155 CC [M] /tmp/vmware-config0/vmhgfs-only/dir.o
156 CC [M] /tmp/vmware-config0/vmhgfs-only/eventManager.o
157 CC [M] /tmp/vmware-config0/vmhgfs-only/file.o
158 CC [M] /tmp/vmware-config0/vmhgfs-only/filesystem.o
159 CC [M] /tmp/vmware-config0/vmhgfs-only/fsutil.o
160 CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
161 CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
162 CC [M] /tmp/vmware-config0/vmhgfs-only/inode.o
163 CC [M] /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
164 CC [M] /tmp/vmware-config0/vmhgfs-only/link.o
165 CC [M] /tmp/vmware-config0/vmhgfs-only/message.o
166 CC [M] /tmp/vmware-config0/vmhgfs-only/module.o
167 CC [M] /tmp/vmware-config0/vmhgfs-only/page.o
168 CC [M] /tmp/vmware-config0/vmhgfs-only/request.o
169 CC [M] /tmp/vmware-config0/vmhgfs-only/rpcin.o
170 CC [M] /tmp/vmware-config0/vmhgfs-only/rpcout.o
171 CC [M] /tmp/vmware-config0/vmhgfs-only/staticEscape.o
172 CC [M] /tmp/vmware-config0/vmhgfs-only/stubs.o
173 CC [M] /tmp/vmware-config0/vmhgfs-only/super.o
174 LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
175 Building modules, stage 2.
176 MODPOST
177 CC /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
178 LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
179make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
180cp -f vmhgfs.ko ./../vmhgfs.o
181make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
182The module loads perfectly in the running kernel.
183
184pcnet32 36805 0
185Unloading pcnet32 module
186
187Extracting the sources of the vmxnet module.
188
189Building the vmxnet module.
190
191Using 2.6.x kernel build system.
192make: Entering directory `/tmp/vmware-config0/vmxnet-only'
193make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
194make[1]: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
195 CC [M] /tmp/vmware-config0/vmxnet-only/vmxnet.o
196/tmp/vmware-config0/vmxnet-only/vmxnet.c: 在函数 ‘vmxnet_probe_device’ 中:
197/tmp/vmware-config0/vmxnet-only/vmxnet.c:560: 警告:当将一个指针转换为大小不同的整数时给出警告
198 Building modules, stage 2.
199 MODPOST
200 CC /tmp/vmware-config0/vmxnet-only/vmxnet.mod.o
201 LD [M] /tmp/vmware-config0/vmxnet-only/vmxnet.ko
202make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
203cp -f vmxnet.ko ./../vmxnet.o
204make: Leaving directory `/tmp/vmware-config0/vmxnet-only'
205The module loads perfectly in the running kernel.
206
207Extracting the sources of the vmblock module.
208
209Building the vmblock module.
210
211Using 2.6.x kernel build system.
212make: Entering directory `/tmp/vmware-config0/vmblock-only'
213make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
214make[1]: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
215 CC [M] /tmp/vmware-config0/vmblock-only/linux/block.o
216 CC [M] /tmp/vmware-config0/vmblock-only/linux/control.o
217 CC [M] /tmp/vmware-config0/vmblock-only/linux/dbllnklst.o
218 CC [M] /tmp/vmware-config0/vmblock-only/linux/dentry.o
219 CC [M] /tmp/vmware-config0/vmblock-only/linux/file.o
220 CC [M] /tmp/vmware-config0/vmblock-only/linux/filesystem.o
221 CC [M] /tmp/vmware-config0/vmblock-only/linux/inode.o
222 CC [M] /tmp/vmware-config0/vmblock-only/linux/module.o
223 CC [M] /tmp/vmware-config0/vmblock-only/linux/stubs.o
224 CC [M] /tmp/vmware-config0/vmblock-only/linux/super.o
225 LD [M] /tmp/vmware-config0/vmblock-only/vmblock.o
226 Building modules, stage 2.
227 MODPOST
228 CC /tmp/vmware-config0/vmblock-only/vmblock.mod.o
229 LD [M] /tmp/vmware-config0/vmblock-only/vmblock.ko
230make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
231cp -f vmblock.ko ./../vmblock.o
232make: Leaving directory `/tmp/vmware-config0/vmblock-only'
233The module loads perfectly in the running kernel.
234
235[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service
236provides a new communication capability with the Host, primarily for
237development at the moment. Would you like to enable this feature? [no] no
238
239
240
241Detected X.org version 7.1.
242
243
244Please choose one of the following display sizes that X will start with (1 -
24515):
246
247[1] "640x480"
248[2] "800x600"
249[3]< "1024x768"
250[4] "1152x864"
251[5] "1280x800"
252[6] "1152x900"
253[7] "1280x1024"
254[8] "1376x1032"
255[9] "1400x900"
256[10] "1400x1050"
257[11] "1440x900"
258[12] "1680x1050"
259[13] "1600x1200"
260[14] "1920x1200"
261[15] "2364x1773"
262Please enter a number between 1 and 15:
263
264[3] 3
265
266
267X Window System Version 7.1.1
268Release Date: 12 May 2006
269X Protocol Version 11, Revision 0, Release 7.1.1
270Build Operating System: Linux 2.6.9-42.ELsmp i686 Red Hat, Inc.
271Current Operating System: Linux localhost.localdomain 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:42:21 EST 2007 i686
272Build Date: 09 January 2007
273Build ID: xorg-x11-server 1.1.1-48.13.el5
274 Before reporting problems, check http://wiki.x.org
275 to make sure that you have the latest version.
276Module Loader present
277Markers: (--) probed, (**) from config file, (==) default setting,
278 (++) from command line, (!!) notice, (II) informational,
279 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
280(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.4515", Time: Wed Jul 22 13:46:33 2009
281(++) Using config file: "/tmp/vmware-config0/XF86Config.4515"
282
283X is running fine with the new config file.
284
285
286Fatal server error:
287xf86OpenConsole: VT_WAITACTIVE failed: Interrupted system call
288
289Starting VMware Tools services in the virtual machine:
290 Switching to guest configuration: [确定]
291 Guest filesystem driver: [确定]
292 Mounting HGFS shares: [确定]
293 Guest memory manager: [确定]
294 Guest vmxnet fast network device: [确定]
295 Blocking file system: [确定]
296 DMA setup: [确定]
297 Guest operating system daemon: [确定]
298
299The configuration of VMware Tools 6.0.0 build-45731 for Linux for this running
300kernel completed successfully.
301
302You must restart your X session before any mouse or graphics changes take
303effect.
304
305You can now run VMware Tools by invoking the following command:
306"/usr/bin/vmware-toolbox" during an X server session.
307
308To use the vmxnet driver, restart networking using the following commands:
309/etc/init.d/network stop
310rmmod pcnet32
311rmmod vmxnet
312modprobe vmxnet
313/etc/init.d/network start
314
315To make use of the virtual printer, you will need to restart the CUPS service
316
317If you wish to configure any experimental features, please run the following
318command: "vmware-config-tools.pl --experimental".
319
320Enjoy,
321
322--the VMware team
323
324[root@localhost vmware-tools-distrib]#
325
4、注意
1安装以下文件:
2
31、kernel-2.6.18-8.el5.i686.rpm
4
52、kernel-devel-2.6.18-8.el5.i686.rpm
6
73、kernel-xen-devel-2.6.18-8.el5.i686.rpm
8
9说明:
10
11//下面这两个文件是加载VMware-Tools之后,出现的安装VMware-Tools的安装源,第一个是直接可执行的文件,第二个是一个压缩文件,需要自己解压缩
12VMwareTools-6.0.0-45731.i386.rpm
13VMwareTools-6.0.0-45731.tar.gz
14
15//这是解压缩文件VMwareTools-6.0.0-45731.tar.gz之后,出现的文件
16vmware-tools-distrib
17
1//安装上述以kernel前缀开头的文件是为了解决以下安装出现的问题
2
3What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]The d irectory of kernel headers (version 2.6.18-8.el5xen) does not match