安装VMware Tools(Linux操作系统)

更新时间:

本文描述如何在Linux操作系统上安装VMware Tools。

前提条件

任务

  • Linux操作系统的VMware Tools安装

操作步骤

  1. 鼠标右击虚拟机, 选择客户机操作系统, 选择安装VMware Toolsimage

    重要

    有些Linux操作系统安装完系统后,就自带开源版本的VMware tools(open-vm-tools)。如果操作系统没有安装VMware Tools,强烈建议安装VMware Tools,可以选择安装开源版本的VMware Tools,也可以根据本文档安装VMware商业版本的VMware Tools。

  2. 显示安装VMware Tools对话框,选择挂载,虚拟机的CD/DVD驱动器上会挂VMware Tools磁盘镜像image

  3. 完成VMware Tools镜像光盘的挂载后,登录Linux操作系统的Bash终端界面进行VMware Tools的安装(Linux不支持图形化界面安装)

##挂载cdrom到/mnt目录
[root@localhost /]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost /]# 

##切换至/mnt目录
[root@localhost /]# cd /mnt/
[root@localhost mnt]# 

##复制VMware Tools安装包至/tmp目录
[root@localhost mnt]# cp VMwareTools-10.3.23-17030940.tar.gz  /tmp/
[root@localhost mnt]# 
[root@localhost mnt]# 

##切换至/tmp目录
[root@localhost mnt]# cd /tmp/

##解压安装包
[root@localhost tmp]# tar zxf VMwareTools-10.3.23-17030940.tar.gz 
[root@localhost tmp]# 

##切换入解压后的目录
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# 
[root@localhost vmware-tools-distrib]# 

##运行如下命令开始安装
[root@localhost vmware-tools-distrib]# ./vmware-install.pl 
open-vm-tools packages are available from the OS vendor and VMware recommends 
using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more 
information.
Do you still want to proceed with this installation? [no] yes ##选择yes,其它保持默认

INPUT: [yes]

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] 

INPUT: [/usr/bin]  default

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc/rc.d] 

INPUT: [/etc/rc.d]  default

What is the directory that contains the init scripts? 
[/etc/rc.d/init.d] 

INPUT: [/etc/rc.d/init.d]  default

In which directory do you want to install the daemon files? 
[/usr/sbin] 

INPUT: [/usr/sbin]  default

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

INPUT: [/usr/lib/vmware-tools]  default

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] 

INPUT: [yes]  default

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

INPUT: [/usr/share/doc/vmware-tools]  default

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

INPUT: [yes]

The installation of VMware Tools 10.3.23 build-17030940 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] 

INPUT: [yes]  default

Initializing...


Making sure services for VMware Tools are stopped.

Stopping vmware-tools (via systemctl):  [  OK  ]


The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

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? [no] 

INPUT: [no]  default

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

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?
[no] 

INPUT: [no]  default


Skipping configuring automatic kernel modules as no drivers were installed by 
this installer.


Disabling timer-based audio scheduling in pulseaudio.

Do you want to enable Guest Authentication (vgauth)? [yes] 

INPUT: [yes]  default



Detected X server version 1.20.4



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.


Skipping rebuilding initrd boot image for kernel as no drivers to be included 
in boot image were installed by this installer.

The configuration of VMware Tools 10.3.23 build-17030940 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

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
3. Restart your X session.

Found VMware Tools CDROM mounted at /run/media/root/VMware Tools. Ejecting 
device /dev/sr0 ...
Enjoy,

--the VMware team

[root@localhost vmware-tools-distrib]# 
##安装完成

  1. 安装完成后,可以正常显示虚拟机的DNS名称和IP地址等信息了。image