本人使用的是vmware workstation6.0绿色版,Linux为Redhat Linux9.0。首先在虚拟机下设置windows的共享文件,然后安装vmware tools实现共享。<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
虚拟机》设置》选项》点下共享文件夹选中后》添加》
下一步》名称(随便填) 》 浏览选择一个共享文件夹》下一步》选择启用该共享》完成。
二、 安装VMvare tools
虚拟机》设置》硬件》点下CDROM》使用ISO镜像》选择你的Vmware tools安装程序镜像。会在虚拟机里弹出cdrom界面如下,桌面上有vmvare tools 盘符
下面就是虚拟机里面的命令操作了,打开虚拟终端
[root@localhost root]# cd /mnt
[root@localhost mnt]# ls 当前没有hgfs文件夹,因为vmvare tools 没有安装
cdrom floppy
[root@localhost root]# cd ..
[root@localhost /]# ls
bin dev home lib misc opt root tftpboot usr
boot etc initrd lost+found mnt proc sbin tmp var
[root@localhost /]# cd tmp
[root@localhost tmp]# ls
orbit-root ssh-XX9WNhuH ssh-XXcHmBpQ ssh-XXnDf4aF vmware-tools-distrib
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# ls
bin doc etc FILES INSTALL installer lib vmware-install.pl
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
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.
Uninstalling the tar installation of VMware Tools.
Skipping VMware Tools services shutdown on the host: [ 确定 ]
The removal of VMware Tools <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />6.0.4 build-93057 for Linux completed successfully.
Thank you for having tried this software.
Installing VMware Tools.
In which directory do you want to install the binary files? [/usr/vmvare
tools] /usr/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d] /etc/rc.d
What is the directory that contains the init scripts?
[/etc/rc.d/init.d] /etc/rc.d/init.d
In which directory do you want to install the daemon files?
[/usr/sbin] /usr/sbin
In which directory do you want to install the library files?
[/usr/lib/vmware-tools] /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] yes
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools] usr/share/doc/vmware-tools
The path "usr/share/doc/vmware-tools" is a relative path. Please enter an
absolute path.
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools] /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] yes
The installation of VMware Tools 6.0.4 build-93057 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
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ 确定 ]
Trying to find a suitable vmmemctl module for your running kernel.
The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.
Trying to find a suitable vmhgfs module for your running kernel.
The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.
pcnet32 18240 0
Unloading pcnet32 module
Trying to find a suitable vmxnet module for your running kernel.
The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.
Trying to find a suitable vmblock module for your running kernel.
The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.
[EXPERIMENTAL] The VMware CPU Time Accounting daemon (vmware-vmdesched) can
help increase the accuracy of CPU time accounting performed by the guest
operating system. Please refer to the VMware Knowledge Base for more details on
this capability. Do you wish to enable this feature? [no] yes
Trying to find a suitable vmdesched module for your running kernel.
The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.
[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service
provides a new communication capability with the Host, primarily for
development at the moment. Would you like to enable this feature? [no] yes
Trying to find a suitable vmci module for your running kernel.
The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.
Detected XFree86 version 4.3.0.
Please choose one of the following display sizes that X will start with (1 -
15):
[1] "640x480"
[2] "800x600"
[3]< "1024x768"
[4] "1152x864"
[5] "1280x800"
[6] "1152x900"
[7] "1280x1024"
[8] "1376x1032"
[9] "1400x900"
[10] "1400x1050"
[11] "1440x900"
[12] "1680x1050"
[13] "1600x1200"
[14] "1920x1200"
[15] "2364x1773"
Please enter a number between 1 and 15:
[3] 3
XFree86 Version 4.3.0 (Red Hat Linux release: 4.3.0-2)
Release Date: 27 February 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.20-3bigmem i686 [ELF]
Build Date: 27 February 2003
Build Host: porky.devel.redhat.com
Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003 PF
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-config0/XF86ConfigLog.2996", Time: Mon Nov 3 16:08:19 2008
(++) Using config file: "/tmp/vmware-config0/XF86Config.2996"
X is running fine with the new config file.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: [ 确定 ]
Guest filesystem driver: [ 确定 ]
Mounting HGFS shares: [ 确定 ]
Guest memory manager: [ 确定 ]
Guest vmxnet fast network device: [ 确定 ]
Loading vmdesched driver module: [ 确定 ]
Guest descheduled time accounting daemon: [ 确定 ]
New Host-Guest communications path: [ 确定 ]
Blocking file system: [ 确定 ]
DMA setup: [ 确定 ]
Guest operating system daemon: [ 确定 ]
The configuration of VMware Tools 6.0.4 build-93057 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 use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start
To make use of the virtual printer, you will need to restart the CUPS service
Enjoy,
--the VMware team
[root@localhost vmware-tools-distrib]# cd /mnt
[root@localhost mnt]# ll 此时可以在mnt目录下见到hgfs文件夹
总用量 9
dr-xr-xr-x 1 root root 2048 7月 20 10:25 cdrom
drwxr-xr-x 2 root root 4096 11月 3 12:02 floppy
dr-xr-xr-x 1 root root 4192 11月 3 16:03 hgfs
[root@localhost mnt]# cd hgfs/
重启vmvare-tools 服务
[root@localhost hgfs]# etc/init.d/vmware-tools restart
Stopping Vmware Tools services in the virtual machine:
Guest operating system daemon: [确定]
Blocking file system: [确定]
Unmounting HGFS shares: [失败]
Guest filesystem driver: [失败]
Guest memory manager: [确定]
关闭环回接口:
Guest vmxnet fast network device: [确定]
New Host-Guest communication path: [确定]
Guest descheduled time accounting daemon: [确定]
Unloading vmdesched driver module: [确定]
查看hgfs文件夹里是否存在windows刚共享的share,存在即表示成功,注意名字为虚拟机下面的名字,即第一步中所设置的share,对应于windows下面的Linux,见上面的图
[root@localhost hgfs]# ls
share
至此Vmware tools安装完毕
用户377235 2012-9-17 15:59
用户1651713 2011-7-31 23:08
用户738303 2011-6-9 22:44
用户347381 2011-5-27 16:19
用户738303 2008-12-30 21:05