ESXi Linux 虚拟机安装 VMware Tools
后知后觉 暂无评论

ESXi 平台内 Linux 虚拟机安装 VMware Tools ,VMT 可以使得虚拟机和宿主机更好的交互,为一些操作提供更便利的方式和体验。

前言

未安装 VMT 的时候,可以看到有安装建议。

未安装

安装

在 Linux 中安装 VMT 时,若系统已经安装 GUI 环境,可以直接在文件管理器中进行界面化安装。

本文演示若没有安装图形界面,应如何安装 VMT。点击提示中的「Action」按钮,然后选择 「Install VMware Tools」。

即可将安装光盘挂载至 Linux 系统,本文以 Debian 10 buster 为例进行演示。

为了操作方便,切换至 root 用户。

sudo su - root

挂载安装盘

# mount /dev/cdrom /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.

然后检查下目录结构

# ls /mnt
manifest.txt     VMwareTools-10.3.22-15902021.tar.gz  vmware-tools-upgrader-64
run_upgrader.sh  vmware-tools-upgrader-32

解压安装包

将安装文件解压至临时文件夹

tar -C /tmp/ -xf /mnt/VMwareTools-10.3.22-15902021.tar.gz

解压后取消光盘挂载

umount /mnt

安装工具包

进入工具包文件夹,检查目录结构

# ls -l /tmp/vmware-tools-distrib
total 400
drwxr-xr-x  2 root root   4096 Mar 24 20:11 bin/
drwxr-xr-x  5 root root   4096 Mar 24 20:10 caf/
drwxr-xr-x  2 root root   4096 Mar 24 20:11 doc/
drwxr-xr-x  5 root root   4096 Mar 24 20:11 etc/
-rw-r--r--  1 root root 146996 Mar 24 20:11 FILES
-rw-r--r--  1 root root   2538 Mar 24 20:11 INSTALL
drwxr-xr-x  2 root root   4096 Mar 24 20:11 installer/
drwxr-xr-x 14 root root   4096 Mar 24 20:10 lib/
drwxr-xr-x  3 root root   4096 Mar 24 20:10 vgauth/
-rwxr-xr-x  1 root root 227024 Mar 24 20:11 vmware-install.pl*

其中 vmware-install.pl 就是安装可执行文件


# ./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

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] 

INPUT: [/etc]  default

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

INPUT: [/etc/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 common agent library files? 
[/usr/lib] 

INPUT: [/usr/lib]  default

In which directory do you want to install the common agent transient files? 
[/var/lib] 

INPUT: [/var/lib]  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] 

INPUT: [yes]  default

The installation of VMware Tools 10.3.22 build-15902021 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 services in the virtual machine:
   Guest operating system daemon:                                      done
   VMware User Agent (vmware-user):                                    done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done


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.

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed 
if you want to enable Common Agent (caf). [yes] 

INPUT: [yes]  default

Do you want to enable Common Agent (caf)? [no] 

INPUT: [no]  default

No X install found.


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

Generating the key and certificate files.
Successfully generated the key and certificate files.
The configuration of VMware Tools 10.3.22 build-15902021 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.

Enjoy,

--the VMware team

验证

安装完毕后即可看到 ESXi 面板中的状态已经变化。

已安装


附录

参考链接

本文撰写于一年前,如出现图片失效或有任何问题,请在下方留言。博主看到后将及时修正,谢谢!
禁用 / 当前已拒绝评论,仅可查看「历史评论」。