陆风x7二手:在CentOS_Linux版虚拟机中安装VMTools工具

来源:百度文库 编辑:九乡新闻网 时间:2024/05/07 19:35:11
为什么要装 VMware Tools?

因为它可以改善 Virtual Machine 的运行性能,而且可以让 本地的OS 和 CentOS 互通有无,这样我们就不用伤脑筋,要架设什么服务器,来沟通两个 OS,现在就让我们开始吧! 图一看到图一中,图标1这里,表示没有安装“VMware Tools” ,要在“VM”选项中点击“Install VMware Tools”进行安装!!!如图标2!!!图二,在图二中,点击“Install”进行安装VMware Tools!!!图三,在图三中有二个种安装方式,简单的就在图三中,直接点击:“应用”就想WIN中安装软件,下一步下一步就可以了。。。这里就不做介绍了。。。我们这一次主要是用“VMwareTools-6.0.2-59824.tar.gz ”来安装VMTools工具![root@localhost ~]# mount -t iso9660 /dev/cdrom /mnt #加载CDROM设备//这时如果进入 /mnt 目录下,你将会发现多了一个文件:VMwareTools-6.0.2-59824.tar.gz 。这就是WMWARE TOOLS的LINUX软件包,
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: /dev/cdrom already mounted or /mnt busy
mount: according to mtab, /dev/hdc is already mounted on /mnt
[root@localhost ~]# cp /mnt/VMwareTools-6.0.2-59824.tar.gz /tmp //将该软件包拷贝到CentOS的tmp目录下
[root@localhost ~]# cd /tmp #进入tmp目录
[root@localhost tmp]# tar zxf VMwareTools-6.0.2-59824.tar.gz //压缩该软件包,默认解压到vmware-linux-distrib目录下(与文件名同名)。

[root@localhost tmp]# ls //查看一下tmp目录下的文件和文件
gconfd-root scim-panel-socket:0-root
keyring-7JZqvI scim-socket-frontend-root
keyring-ReIvNv ssh-YBJsXe2479
keyring-uVhSan virtual-root.fEFapV
mapping-root virtual-root.KivsMu
orbit-root virtual-root.SjEmT1
scim-bridge-0.3.0.lockfile-0@localhost:0.0 VMwareTools-6.0.2-59824.tar.gz
scim-bridge-0.3.0.socket-0@localhost:0.0 vmware-tools-distrib
scim-helper-manager-socket-root
[root@localhost tmp]# cd vmware-tools-distrib //进入vmware-tools-distrib 文件夹
[root@localhost vmware-tools-distrib]# ls //查看文件夹中的文件,找到对应的安装文件 *.pl(这里是vmware-install.pl)
bin doc etc FILES INSTALL installer lib vmware-install.pl

[root@localhost 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/rc.d]
What is the directory that contains the init scripts?
[/etc/rc.d/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] 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] yes
The installation of VMware Tools 6.0.2 build-59824 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 bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
Trying to find a suitable vmhgfs module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
pcnet32 30409 0
Unloading pcnet32 module
Trying to find a suitable vmxnet module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
Trying to find a suitable vmblock module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 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] no
[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] no
Detected X.org version 6.8.
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:
[5] 3 //选择安装vmtools后的屏幕分辨率[3] "1024x768"
X Window System Version 6.8.1
Release Date: 17 September 2004
X Protocol Version 11, Revision 0, Release 6.8.1
Build Operating System: Linux 2.6.9-1.860_ELsmp i686 [ELF]
Current Operating System: Linux localhost.localdomain 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686
Build Date: 09 December 2004
Build Host: tweety.build.redhat.com
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.9-5.EL (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 Wed Jan 5 19:22:18 EST 2005 P
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.3037", Time: Tue Jul 14 16:14:32 2009
(++) Using config file: "/tmp/vmware-config0/XF86Config.3037"
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: [ 确定 ]
Blocking file system: [ 确定 ]
DMA setup: [ 确定 ]
Guest operating system daemon: [ 确定 ]
The configuration of VMware Tools 6.0.2 build-59824 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 teamCentOS重启。。。就可以看到图一中图标1中变成下图所显示。。。说明VMTools安装成功了。。。图四一种奇怪的现象发生了: 重新启动CentOS之后,当我们要离开 CentOS 的时候,不再需要按 Ctrl + Alt 了!现在我们来共享 WINXP_OS 的文件夹给 CentOS 使用图五如图五,进入VM的“编辑虚拟机设置”
这就是共享完毕的画面,然后我们就到 CentOS 内看看可不可以读取到刚刚共享的目录

在「/mnt/hgfs」文件夹,看到了刚刚共享的文件夹“text” ...到这里,此实验就成功完成了。。。