在 Linux 虚拟机中手动安装 VMware ToolsLast Updated January 26, 2025
对于 Linux 虚拟机,您可以从命令行手动安装 VMware Tools。对于 Linux 的较高发行版,请使用集成的 open-vm-tools 版本。
有关 open-vm-tools 的操作系统兼容性的详细信息,请参见
《VMware 兼容性指南》
,网址为 https://www.vmware.com/resources/compatibility/search.php。
- Power on the virtual machine.
- Verify that the guest operating system is running.
- Because the VMware Tools installer is written in Perl, verify that Perl is installed in the guest operating system.
- For vSphere virtual machines, determine whether you have the latest version of VMware Tools. In the vSphere Client inventory, select the virtual machine and click theSummarytab.
- Select the menu command to mount the VMware Tools virtual disk on the guest operating system.VMware ProductActionvSphere Client (HTML5)Right-click the virtual machine and selectvSphere ClientvSphere Web ClientRight-click the virtual machine and selectFusionWorkstation ProWorkstation Player
- 在虚拟机中,打开终端窗口。
- 不带参数运行mount命令以确定 Linux 发行版是否自动装载 VMware Tools 虚拟 CD-ROM 映像。如果已挂载 CD-ROM 设备,CD-ROM 设备及其挂载点将以类似于以下输出的形式列出:
- 如果未装载 VMware Tools 虚拟 CD-ROM 映像,请装载 CD-ROM 驱动器。
- 如果装载点目录尚不存在,请创建该目录。/media/VMware Tools而不是/mnt/cdrom。请修改该命令以反映您的发行版使用的约定。
- 装载 CD-ROM 驱动器。某些 Linux 发行版使用不同的设备名称,或者以不同的方式组织/dev目录。如果 CD-ROM 驱动器不是/dev/cdrom或 CD-ROM 装载点不是/mnt/cdrom,则必须修改该命令以反映您的发行版使用的约定。
- Change to a working directory, for example,/tmp.cd /tmp
- (可选)在安装 VMware Tools 之前,删除以前的vmware-tools-distrib目录。该目录的位置取决于以前安装时的存储位置。通常,该目录位于/tmp/vmware-tools-distrib。
- 列出挂载点目录的内容,并记下 VMware Tools tar 安装程序的文件名。
- 解压缩安装程序。x.x.x值是产品版本号,yyyy是产品版本的内部版本号。
- 如果需要,请卸载 CD-ROM 映像。如果 Linux 发行版自动装载 CD-ROM,则不需要卸载该映像。
- 运行安装程序并以 root 用户身份配置 VMware Tools。通常,在安装程序文件结束运行后,将行vmware-config-tools.pl配置文件。如果尝试安装 tar 安装以覆盖 RPM 安装或相反,安装程序将检测以前的安装并且必须转换安装程序数据库格式,然后才能继续操作。对于 Linux 的较高发行版,系统会提示用户选择集成的 open-vm-tools。
- Follow the prompts to accept the default values, if appropriate for your configuration.
- Follow the instructions at the end of the script.Depending on the features you use, these instructions can include restarting the X session, restarting networking, logging in again, and starting the VMware User process. You can alternatively reboot the guest operating system to accomplish all these tasks.
If you are using vCenter Server, the
VMware Tools
label on the Summary
tab changes to OK
. If you upgraded VMware Tools as part of a vSphere upgrade, next determine whether to upgrade the virtual machines in your environment. To review and compare the hardware available for different compatibility levels, see the
vSphere Virtual Machine Administration
documentation.