linux 安装VMware Tools 方法 (1)

    虚拟机安装 VMware Tools for Linux




介绍:


VMware Tools是VMware虚拟机中自带的一种增强工具,相当于VirtualBox中的增强功能(Sun VirtualBox Guest Additions),是VMware提供的增强虚拟显卡和硬盘性能、以及同步虚拟机与主机时钟的驱动程序。

只有在VMware虚拟机中安装好了VMware Tools,才能实现主机与虚拟机之间的文件共享,同时可支持自由拖拽的功能,鼠标也可在虚拟机与主机之前自由移动(不用再按ctrl+alt),且虚拟机屏幕也可实现全屏化。

VMware Tools专栏提供VMware Tools下载及安装方法(含VMware Tools在linux系统,如Ubuntu系统下的安装方法),以及VMware Tools安装出错的解决方法。


作用解析:


1. 更新虚拟机中的显卡驱动, 使虚拟机中的XWindows可以运行在SVGA模式下.

2. 提供一个vmware-toolbox, 这个Xwindows下的工具可以让你修改一些VMWare的参数和功能.

3. 同步虚拟机和Host的时间.

4. 支持同一个分区的真实启动和从虚拟机中启动, 自动修改相应的设置文件.

VMware Workstation 从软盘和/或 CD-ROM 直接安装未修改的操作系统。在构造一台虚拟

机时,这个安装过程是第一步并且也是唯一必需的一步。

但是,VMware 强烈建议你在每一台虚拟机中完成操作系统安装之后立即安装 VMware Tools 套件。在客户操作系统中安装 VMware Tools 非常重要。如果你不安装 VMware Tools,虚拟机中的图形环境被限制为 VGA 模式图形(640x480,16 色)。

使用 VMware Tools,SVGA 驱动程序被安装,VMware Workstation 支持最高 32 位显示和

高显示分辨率,显著提升总体的图形性能。

工具包中的其他工具通过支持下面的增强,让你更方便地使用你的虚拟机。注意,只有正

在运行 VMware Tools 时,这些增强才可用。

在主机和客户机之间时间同步

注释: 只有当你在客户操作系统中设置时钟为一个比在主机中设置的时间更早的时间时,才可以在客户和主机操作系统之间同步时间。

自动捕获和释放鼠标光标

在主机和客户机之间或者从一台虚拟机到另一台虚拟机进行复制和粘贴操作

改善的网络性能


组成部分:


VMware Tools 工具包由两个组件组成:

一个为 VMware Workstation 虚拟图形卡优化的图形驱动程序。对于 Linux 客户操作系统,它包含我们自己的 XFree86 X server 版本。图形驱动程序由向导安装。安装之后,需要在重启动之后才可以使用。

一个小的后台应用程序,允许你在虚拟机中更改配置设置。VMware Workstation 控制光标设置和可移动设备的连接状态,例如软盘和 CD-ROM 驱动器。

光标设置允许你在虚拟机和主机图形用户界面之间平滑移动鼠标光标。光标设置也允许你在虚拟机和主机之间以及从一台虚拟机到另一台虚拟机复制和粘贴文本缓存。注意,只有当应用程序正在运行时,这些增强才可用。


Linux VMware tools安装步骤:


(1) 在CD-ROM虚拟光驱中选择使用ISO镜像,找到VMWARE TOOLS 安装文件,如C:\Program Files (x86)\VMware\VMware Workstation\linux.iso

(2) 以ROOT身份进入LINUX

(3) 进入linux新建一个终端,输入 /sbin/telinit 3 进入纯文本模式,然后在纯文本模式下再次用root身份登陆

(4)退出到windows,在虚拟机菜单栏中点击 虚拟机-> 安装VMWARE TOOLS子菜单,会弹出对话框,点击"确认" 安装

(5 )挂载光驱 mount /dev/cdrom /mnt/cdrom (注意命令中输入的空格)这时,你的linux.iso里面的文件就相当于windows光盘里面的文件了

(6) 使用 cd /mnt/cdrom 进入光驱,输入ls命令你会查看到有个*.tar.gz格式的文件(如vmware-linux-tools.tar.gz),然后输入命令CP vmware-linux-tools /tmp/将它复制到/tmp/目录下

(7)输入命令 cd /tmp 进入/tmp目录

(8)输入命令tar -zxf vmware-linux-tools.tar.gz 将刚刚复制的vmware-linux-tools.tar.gz 解压,默认解压到vmware-linux-tools目录下(与文件名同名)此时就会多出一个命名为vmware-linux-tools文件夹,这里和windows 里面的解压结果一样。

(9)输入命令 cdvmware-linux-tools 进入解压后的目录

(10) 输入命令 ./*.pl 运行安装VMware tools (*.pl文件在前面有提过)

(11)在运行安装过程中,它会一步一步的有问题提出要你回应,此过程中,你只要见到问题后面显示[yes]、[no]、[yes/no]的都输入yes,然后回车,其他的问题后面不管[ ]里面是什么直接回车就好,不要输入。

(12)最后它会输出1——15个分辨率让你输入数字选择,根据你的显示器来选择分辨率吧

(13)好了,安装完成,输入命令 startx 回到linux图像界面吧。



安装步骤如下:


[root@localhost VMware Tools]# ls 

manifest.txt     VMwareTools-9.6.0-1294478.tar.gz  vmware-tools-upgrader-64

run_upgrader.sh  vmware-tools-upgrader-32

[root@localhost VMware Tools]# cp  VMwareTools-9.6.0-1294478.tar.gz  /root/

[root@localhost VMware Tools]# cd  /root/

[root@localhost ~]# tar xzf  VMwareTools-9.6.0-1294478.tar.gz 

[root@localhost ~]# ls

anaconda-ks.cfg  install.log         VMwareTools-9.6.0-1294478.tar.gz

Desktop          install.log.syslog  vmware-tools-distrib

[root@localhost ~]# 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 

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] 

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] 

The installation of VMware Tools 9.6.0 build-1294478 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] 

Initializing...

Making sure services for VMware Tools are stopped.


Stopping Thinprint services in the virtual machine:

   Stopping Virtual Printing daemon:                                   done

Stopping VMware Tools services in the virtual machine:

   Guest operating system daemon:                          [确定]

   Unmounting HGFS shares:                                 [确定]

   Guest filesystem driver:                                [确定]



The VMware FileSystem Sync Driver (vmsync) allows external third-party backup 

software that is integrated with vSphere to create backups of the virtual 

machine. Do you wish to enable this feature? [no] 

Found a compatible pre-built module for vmci.  Installing it...



Found a compatible pre-built module for vsock.  Installing it...



Found a compatible pre-built module for vmxnet3.  Installing it...



Found a compatible pre-built module for pvscsi.  Installing it...



Found a compatible pre-built module for vmmemctl.  Installing it...



The VMware Host-Guest Filesystem allows for shared folders between the host OS 

and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 

to enable this feature? [yes] 

Found a compatible pre-built module for vmhgfs.  Installing it...



Found a compatible pre-built module for vmxnet.  Installing it...



The vmblock enables dragging or copying files between host and guest in a 

Fusion or Workstation virtual environment.  Do you wish to enable this feature?

[yes] 

Found a compatible pre-built module for vmblock.  Installing it...



VMware automatic kernel modules enables automatic building and installation of

VMware kernel modules at boot that are not already present. This feature can be


enabled/disabled by re-running vmware-config-tools.pl.


Would you like to enable VMware automatic kernel modules?

[no] 

Thinprint provides driver-free printing. Do you wish to enable this feature? 

[yes] 



Detected X version 7.1



Resolution detected as "800 x 600".



Please choose one of the following display sizes that X will start with:


[1]  640x480

[2]< 800x600

[3]  1024x768

[4]  1280x800

Please enter a number between 1 and 4:


[2] 



X is running fine with the new config file.


Creating a new initrd boot image for the kernel.

   Starting Virtual Printing daemon:                                   done

   Checking acpi hot plug                                  [确定]

Starting VMware Tools services in the virtual machine:

   Switching to guest configuration:                       [确定]

   Paravirtual SCSI module:                                [确定]

   Guest memory manager:                                   [确定]

   VM communication interface:                             [确定]

   VM communication interface socket family:               [确定]

   Guest filesystem driver:                                [确定]

   Mounting HGFS shares:                                   [失败]

   Blocking file system:                                   [确定]

   Guest operating system daemon:                          [确定]

The configuration of VMware Tools 9.6.0 build-1294478 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 "/usr/bin/vmware-toolbox-cmd" from the

command line.


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.


Enjoy,


--the VMware team


Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device 

/dev/sr0 ...

umount: /media/VMware Tools: device is busy

umount: /media/VMware Tools: device is busy

eject: unmount of `/media/VMware Tools‘ failed

Eject Failed:  If possible manually eject the Tools installer from the guest 

cdrom mounted at /media/VMware Tools before canceling tools install on the 

host.

[root@localhost vmware-tools-distrib]# init 6  这个命令可以打,也可以不打。不打的话就注销一下就可以了。





本文出自 “Dragon” 博客,请务必保留此出处http://1208073155.blog.51cto.com/9039381/1436524

linux 安装VMware Tools 方法 (1),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。