在 Linux 虛擬機器中手動安裝 VMware Tools

針對 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 the
    Summary
    tab.
  1. Select the menu command to mount the VMware Tools virtual disk on the guest operating system.
    VMware Product
    Action
    vSphere Client (HTML5)
    Right-click the virtual machine and select
    Guest OS
    Install (or Upgrade) Tools
    vSphere Client
    Inventory
    Virtual Machine
    Guest
    Install/Upgrade VMware
    vSphere Web Client
    Right-click the virtual machine and select
    Guest OS
    Install (or Upgrade) VMware Tools
    Fusion
    Virtual Machine
    Install (or Upgrade) VMware Tools
    Workstation Pro
    VM
    Install (or Upgrade) VMware Tools
    Workstation Player
    Player
    Manage
    Install (or Upgrade) VMware Tools
  2. 在虛擬機器中,開啟終端機視窗。
  3. 執行不帶引數的
    mount
    命令,判斷 Linux 發行版是否已自動掛接 VMware Tools 虛擬 CD-ROM 映像。
    如果已掛接 CD-ROM 裝置,會以類似下列輸出的方式列出 CD-ROM 裝置和其掛接點:
    /dev/cdrom on /mnt/cdrom type iso9660 (ro,nosuid,nodev)
  4. 如果未掛接 VMware Tools 虛擬 CD-ROM 映像,請掛接 CD-ROM 光碟機。
    1. 如果掛接點目錄尚不存在,請加以建立。
      mkdir /mnt/cdrom
      某些 Linux 發行版使用不同的掛接點名稱。例如,在一些發行版中掛接點為
      /media/VMware Tools
      ,而非
      /mnt/cdrom
      。請修改命令以反映您的發行版所使用的慣例。
    2. 掛接 CD-ROM 光碟機。
      mount /dev/cdrom /mnt/cdrom
      一些 Linux 發行版使用不同的裝置名稱,或以不同的方式組織整理
      /dev
      目錄。如果 CD-ROM 光碟機不是
      /dev/cdrom
      ,或者如果 CD-ROM 的掛接點不是
      /mnt/cdrom
      ,請修改命令以反映您的發行版所使用的慣例。
  5. Change to a working directory, for example,
    /tmp
    .
    cd /tmp
  6. (選擇性) 安裝 VMware Tools 前,請先刪除先前的任何
    vmware-tools-distrib
    目錄。
    此目錄的位置取決於先前執行安裝時所放置的位置。通常情況下,此目錄位於
    /tmp/vmware-tools-distrib
  7. 列出掛接點目錄的內容,並記下 VMware Tools tar 安裝程式的檔案名稱。
    ls
    mount-point
  8. 解壓縮安裝程式。
    tar zxpf /mnt/cdrom/VMwareTools-
    x.x.x
    -
    yyyy
    .tar.gz
    x.x.x
    是產品版本號碼,
    yyyy
    是產品版本的組建編號。
  9. 如有必要,請卸載 CD-ROM 映像。
    umount /dev/cdrom
    如果 Linux 發行版已自動掛接 CD-ROM,則不需要卸載映像。
  10. 以根使用者的身分執行安裝程式並設定 VMware Tools
    cd vmware-tools-distrib sudo ./vmware-install.pl
    通常情況下,執行完安裝程式檔案之後會執行
    vmware-config-tools.pl
    組態檔。如果嘗試在 RPM 安裝之上執行 tar 安裝,或者在 tar 安裝上執行 RPM 安裝,安裝程式會偵測到先前的安裝,並且必須轉換安裝程式資料庫格式,才能繼續。
    對於較新的 Linux 發行版,系統會提示使用者選擇整合的 open-vm-tools。
  11. Follow the prompts to accept the default values, if appropriate for your configuration.
  12. 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.