Posted on 2009-07-22 19:48
大源 阅读(1215)
评论(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
在终端里执行:
1
rpm -ivh kernel-devel-2.6.18-8.el5.i686.rpm
2
or
3
rpm -ivh kernel-xen-devel-2.6.18-8.el5.i686.rpm
4
#install package
5
6
uname -r
7
# running kernel
8
9
rpm -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
3
bash: LS: command not found
4
[root@localhost software]# ls
5
VMware-tools
6
[root@localhost software]# cd VMware-tools/
7
[root@localhost VMware-tools]# ls
8
kernel-xen-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
9
VMwareTools-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
11
warning: kernel-xen-devel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
12
Preparing
########################################### [100%]
13
1:kernel-xen-devel ########################################### [100%]
14
[root@localhost VMware-tools]# uname -r
15
2.6.18-8.el5xen
16
[root@localhost VMware-tools]# rpm -q kenel-devel
17
package kenel-devel is not installed
18
[root@localhost VMware-tools]# ls
19
kernel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
20
kernel-xen-devel-2.6.18-8.el5.i686.rpm vmware-tools-distrib
21
VMwareTools-6.0.0-45731.i386.rpm
22
[root@localhost VMware-tools]# rpm -ivh kernel-
23
kernel-2.6.18-8.el5.i686.rpm
24
kernel-xen-devel-2.6.18-8.el5.i686.rpm
25
[root@localhost VMware-tools]# rpm -ivh kernel-2.6.18-8.el5.i686.rpm
26
warning: kernel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
27
Preparing
########################################### [100%]
28
1:kernel ########################################### [100%]
29
[root@localhost VMware-tools]# uname -r
30
2.6.18-8.el5xen
31
[root@localhost VMware-tools]# rpm -q kernel-devel
32
package kernel-devel is not installed
33
[root@localhost VMware-tools]# ls
34
kernel-2.6.18-8.el5.i686.rpm kernel-xen-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
35
kernel-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
37
warning: kernel-devel-2.6.18-8.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
38
Preparing
########################################### [100%]
39
1:kernel-devel ########################################### [100%]
40
[root@localhost VMware-tools]# uname -r
41
2.6.18-8.el5xen
42
[root@localhost VMware-tools]# rpm -q kernel-devel
43
kernel-devel-2.6.18-8.el5
44
[root@localhost VMware-tools]# ls
45
kernel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.i386.rpm
46
kernel-devel-2.6.18-8.el5.i686.rpm VMwareTools-6.0.0-45731.tar.gz
47
kernel-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
50
bin doc etc FILES INSTALL installer lib vmware-install.pl
51
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
52
A previous installation of VMware Tools has been detected.
53
54
The previous installation was made by the tar installer (version 4).
55
56
Keeping the tar4 installer database format.
57
58
Uninstalling the tar installation of VMware Tools.
59
60
Stopping VMware Tools services in the virtual machine:
61
Guest operating system daemon: [确定]
62
63
The removal of VMware Tools 6.0.0 build-45731 for Linux completed successfully.
64
Thank you for having tried this software.
65
66
Installing VMware Tools. This may take from several minutes to over an hour
67
depending upon its size.
68
69
In which directory do you want to install the binary files?
70
[/usr/bin]
71
72
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
73
[/etc/rc.d]
74
75
What is the directory that contains the init scripts?
76
[/etc/rc.d/init.d]
77
78
In which directory do you want to install the daemon files?
79
[/usr/sbin]
80
81
In which directory do you want to install the library files?
82
[/usr/lib/vmware-tools]
83
84
The path "/usr/lib/vmware-tools" does not exist currently. This program is
85
going to create it, including needed parent directories. Is this what you want?
86
[yes]
87
88
In which directory do you want to install the documentation files?
89
[/usr/share/doc/vmware-tools]
90
91
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
92
is going to create it, including needed parent directories. Is this what you
93
want? [yes]
94
95
The installation of VMware Tools 6.0.0 build-45731 for Linux completed
96
successfully. You can decide to remove this software from your system at any
97
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
98
99
Before running VMware Tools for the first time, you need to configure it by
100
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
101
this program to invoke the command for you now? [yes]
102
103
104
Stopping VMware Tools services in the virtual machine:
105
Guest operating system daemon: [确定]
106
Trying to find a suitable vmmemctl module for your running kernel.
107
108
None of the pre-built vmmemctl modules for VMware Tools is suitable for your
109
running kernel. Do you want this program to try to build the vmmemctl module
110
for your system (you need to have a C compiler installed on your system)?
111
[yes]
112
113
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
114
115
What is the location of the directory of C header files that match your running
116
kernel? [/lib/modules/2.6.18-8.el5xen/build/include]
117
118
Extracting the sources of the vmmemctl module.
119
120
Building the vmmemctl module.
121
122
Using 2.6.x kernel build system.
123
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
124
make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
125
make[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
131
WARNING: 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
134
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
135
cp -f vmmemctl.ko ./../vmmemctl.o
136
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
137
The module loads perfectly in the running kernel.
138
139
Extracting the sources of the vmhgfs module.
140
141
Building the vmhgfs module.
142
143
Using 2.6.x kernel build system.
144
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
145
make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
146
make[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
179
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
180
cp -f vmhgfs.ko ./../vmhgfs.o
181
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
182
The module loads perfectly in the running kernel.
183
184
pcnet32 36805 0
185
Unloading pcnet32 module
186
187
Extracting the sources of the vmxnet module.
188
189
Building the vmxnet module.
190
191
Using 2.6.x kernel build system.
192
make: Entering directory `/tmp/vmware-config0/vmxnet-only'
193
make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
194
make[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
202
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
203
cp -f vmxnet.ko ./../vmxnet.o
204
make: Leaving directory `/tmp/vmware-config0/vmxnet-only'
205
The module loads perfectly in the running kernel.
206
207
Extracting the sources of the vmblock module.
208
209
Building the vmblock module.
210
211
Using 2.6.x kernel build system.
212
make: Entering directory `/tmp/vmware-config0/vmblock-only'
213
make -C /lib/modules/2.6.18-8.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
214
make[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
230
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-i686'
231
cp -f vmblock.ko ./../vmblock.o
232
make: Leaving directory `/tmp/vmware-config0/vmblock-only'
233
The module loads perfectly in the running kernel.
234
235
[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service
236
provides a new communication capability with the Host, primarily for
237
development at the moment. Would you like to enable this feature? [no] no
238
239
240
241
Detected X.org version 7.1.
242
243
244
Please choose one of the following display sizes that X will start with (1 -
245
15):
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"
262
Please enter a number between 1 and 15:
263
264
[3] 3
265
266
267
X Window System Version 7.1.1
268
Release Date: 12 May 2006
269
X Protocol Version 11, Revision 0, Release 7.1.1
270
Build Operating System: Linux 2.6.9-42.ELsmp i686 Red Hat, Inc.
271
Current Operating System: Linux localhost.localdomain 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:42:21 EST 2007 i686
272
Build Date: 09 January 2007
273
Build 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.
276
Module Loader present
277
Markers: (--) 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
283
X is running fine with the new config file.
284
285
286
Fatal server error:
287
xf86OpenConsole: VT_WAITACTIVE failed: Interrupted system call
288
289
Starting 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
299
The configuration of VMware Tools 6.0.0 build-45731 for Linux for this running
300
kernel completed successfully.
301
302
You must restart your X session before any mouse or graphics changes take
303
effect.
304
305
You can now run VMware Tools by invoking the following command:
306
"/usr/bin/vmware-toolbox" during an X server session.
307
308
To use the vmxnet driver, restart networking using the following commands:
309
/etc/init.d/network stop
310
rmmod pcnet32
311
rmmod vmxnet
312
modprobe vmxnet
313
/etc/init.d/network start
314
315
To make use of the virtual printer, you will need to restart the CUPS service
316
317
If you wish to configure any experimental features, please run the following
318
command: "vmware-config-tools.pl --experimental".
319
320
Enjoy,
321
322
--the VMware team
323
324
[root@localhost vmware-tools-distrib]#
325
4、注意
1
安装以下文件:
2
3
1、kernel-2.6.18-8.el5.i686.rpm
4
5
2、kernel-devel-2.6.18-8.el5.i686.rpm
6
7
3、kernel-xen-devel-2.6.18-8.el5.i686.rpm
8
9
说明:
10
11
//下面这两个文件是加载VMware-Tools之后,出现的安装VMware-Tools的安装源,第一个是直接可执行的文件,第二个是一个压缩文件,需要自己解压缩
12
VMwareTools-6.0.0-45731.i386.rpm
13
VMwareTools-6.0.0-45731.tar.gz
14
15
//这是解压缩文件VMwareTools-6.0.0-45731.tar.gz之后,出现的文件
16
vmware-tools-distrib
17
1
//安装上述以kernel前缀开头的文件是为了解决以下安装出现的问题
2
3
What 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