VMware Tools 安裝教程

2021-02-19 編程那些年

 

前言

    通常VMware再安裝完虛擬機後,會自動安裝VMware Tools, 但有時候會因為各種原因導致Tool工具沒有正常安裝,下面就來講下如何重新安裝VMWare Tools及各類常見問題排查。

配置環境

    VMware  15.1.0

    Ubuntu 18.04

安裝流程

    首選,保證虛擬機處於開機狀態,然後選擇「虛擬機->重新安裝VMware Tools(T)...」 或者 「虛擬機->安裝VMware Tools(T)...」

   此時會在虛擬的桌面生成「VMware Tools」的DVD光碟機掛載點,如下所示:

   

    通過「mount | grep VM」,我們可以看到實際掛載在「/media/linux/VMware Tools」目錄,如下:

linux@ubuntu:~$ mount | grep VM/dev/sr0 on /media/linux/VMware Tools type iso9660 (ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400,uhelper=udisks2)linux@ubuntu:~$

     因此,我們可以進入到「/media/linux/VMware Tools」目錄,將VMwareTools壓縮包拷貝到家目錄下,如下所示:

linux@ubuntu:~$ cd /media/linux/VMware\ Toolslinux@ubuntu:/media/linux/VMware Tools$ lsmanifest.txtrun_upgrader.shVMwareTools-10.3.10-12406962.tar.gzvmware-tools-upgrader-32vmware-tools-upgrader-64linux@ubuntu:/media/linux/VMware Tools$ cp VMwareTools-10.3.10-12406962.tar.gz  /home/linux/linux@ubuntu:/media/linux/VMware Tools$ cdlinux@ubuntu:~$ ls VMwareTools-10.3.10-12406962.tar.gzVMwareTools-10.3.10-12406962.tar.gzlinux@ubuntu:~$

    

    然後解壓該壓縮包,得到vmware-tools-distrib目錄,如下:

linux@ubuntu:~$ tar -xf VMwareTools-10.3.10-12406962.tar.gzlinux@ubuntu:~$ lsDesktop           PublicDocuments         TemplatesDownloads         Videosexamples.desktop  VMwareTools-10.3.10-12406962.tar.gzMusic             vmware-tools-distribPictureslinux@ubuntu:~$

    

    進入vmware-tools-distrib」目錄,運行「sudo ./vmware-install.pl 」 命令,然後一路的yes和回車即可,如下所示:

linux@ubuntu:~/vmware-tools-distrib$ cd ..linux@ubuntu:~$ cd vmware-tools-distrib/linux@ubuntu:~/vmware-tools-distrib$ lsbin  doc  FILES    installer  vgauthcaf  etc  INSTALL  lib        vmware-install.pllinux@ubuntu:~/vmware-tools-distrib$ sudo ./vmware-install.pl [sudo] password for linux: 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? [yes] yes
INPUT: [yes]
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] yes
INPUT: [yes]
Uninstalling the tar installation of VMware Tools.
Stopping services for VMware Tools
Stopping VMware Tools services in the virtual machine: Guest operating system daemon: done VGAuthService: done VMware User Agent (vmware-user): done Blocking file system: done Unmounting HGFS shares: done Guest filesystem driver: done
cat: /tmp/_cafenv-appconfig_: No such file or directoryThis program previously created the directory /etc/vmware-caf/pme/config, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.
This program previously created the directory /etc/vmware-caf/pme, and was about to remove it. Since there are files in that directory that this program did not create, it will not be removed.
This program previously created the directory /etc/vmware-tools, and was about to remove it. Since there are files in that directory that this program did notcreate, it will not be removed.
This program previously created the directory /etc/vmware-caf, and was about toremove it. Since there are files in that directory that this program did not create, it will not be removed.
File /etc/pulse/default.pa is backed up to /etc/pulse/default.pa.old.0.
The removal of VMware Tools 10.3.10 build-12406962 for Linux completed successfully.
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.10 build-12406962 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 VGAuthService: done VMware User Agent (vmware-user): done Blocking file system: 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 installeror 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? [yes] yes
INPUT: [yes]
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?[yes] yes
INPUT: [yes]

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)? Enabling vgauth is needed if you want to enable Common Agent (caf). [yes] yes
INPUT: [yes]
Do you want to enable Common Agent (caf)? [no] yes
INPUT: [yes]


Detected X server version 1.20.5


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.

NOTE: both /etc/vmware-tools/GuestProxyData/server/key.pem and /etc/vmware-tools/GuestProxyData/server/cert.pem already exist. They are not generated again. To regenerate them by force, use the "vmware-guestproxycerttool -g -f" command.
The configuration of VMware Tools 10.3.10 build-12406962 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-user2. Log out and log back into your desktop session3. Restart your X session.
Found VMware Tools CDROM mounted at /media/linux/VMware Tools. Ejecting device /dev/sr0 ...Enjoy,

linux@ubuntu:~/vmware-tools-distrib$

      

      這樣正常就把VMware Tools安裝好了,至於在安裝之前和安裝之後出現的幾種常見問題,可根據如下常見問題排查進行排查.

 常見問題排查

問題一:「安裝VMware Tools(T)...」處於灰化狀態

    啟動虛機後,無法選擇「安裝VMware Tools(T)...」選項的,如下圖:

    這可能是由於安裝了精簡版的workstations所致,可通過官網下載對應的tools工具包,官網地址如下:

http://softwareupdate.vmware.com/cds/vmw-desktop/ws/

    

    以VMware workstations 15.1.0為例, 下載如下所示的工具包:

    然後提取其中的ISO文件(如VMware workstatons 15.1.0對應的VMware-tools-windows-10.3.10-12406962.iso),然後通過菜單欄上的 「設置->虛擬機設置->CD/DVD->使用ISO鏡像文件」(虛擬機保持啟動狀態),選擇提取出來的ISO文件,此時就可以重新安裝Tools。

問題二、虛擬機窗口顯示太小

       選擇菜單中的「查看->自動調整大小->自動適應客戶機」,即可自適應虛擬機窗口大小,將其平鋪至VMware主窗口中,如下:

    

問題三、如何掛載Windows主機的共享目錄

      通過菜單欄上的「設置->虛擬機設置->選項->共享文件夾」,選擇「總是啟用」,並通過「添加「按鈕添加需要共享的目錄,點擊「確定」即可,如下所示:   

       此時,通過cd命令進入"/mnt/hgfs/",就可以看到已經掛載的目錄,如下所示:

linux@ubuntu:~/vmware-tools-distrib$ cd /mnt/hgfs/linux@ubuntu:/mnt/hgfs$ lsFlinux@ubuntu:/mnt/hgfs$ 

喜歡的朋友關注下微信公眾號,並幫忙點個「贊」和「在看」吧

END

相關焦點

  • VMware tools詳細安裝過程
    在VMware下安裝完Ubuntu的虛擬機後,界面總是很小,使用起來非常的不方便而且不美觀,但是該工作對於小白而言有事比較困難的事情(ps:真的挺費勁的
  • 小白貼:VMware Ubuntu中安裝VMware Tools
    安裝VMware Tools打開「VMware Workstation Pro」----左側欄選擇Ubuntu作業系統----虛擬機----安裝VMware Toolsmanifest.txt  run_upgrader.sh  VMwareTools-10.1.0-4449150.tar.gz  vmware-tools-upgrader-32  vmware-tools-upgrader-64wuxiangping@linuxcool:/mnt/cdrom$ sudo tar xf VMwareTools-*.tar.gz -C /tmp
  • Install VMware Tools in CentOS 7 command line mode
    7.輸入「cd vmware-tools-distrib/」進入名為「vmware-tools-distrib」的目錄,輸入「./vmware-install.pl」嘗試安裝,出現錯誤「-bash: ./vmware-install.pl: /usr/bin/per: bad interpreter: No such file or directory」,表明未安裝編譯環境。
  • 實用貼:在常用Linux作業系統中安裝VMware Tools
    ,Ubuntu最簡單的方法就是從網絡倉庫安裝open-vm-tools。在Fedora31/Centos7/Centos8上面安裝open-vm-tools# 沒有圖形化界面的安裝這個包[root@localhost ~]# yum -y install open-vm-tools# 有圖形化界面的安裝這個包[root@localhost ~]#
  • VMware 虛擬機安裝 macOS 詳細教程
    為了裝黑蘋果系統,有時可能需要一個 macOS 環境來運行某些軟體,當然還有大部分是為了工作需要我們要在蘋果系統 macOS 上安裝相應的軟體進行測試,而平時用的最多又是 Windows 作業系統,總不能為了一兩次測試學習而去購買一臺Mac電腦,所以利用VMware虛擬機來安裝Mac OS就是最好的選擇了,今天這篇教程,就詳細帶大家解讀如何用 VMware 虛擬機安裝 macOS 。
  • Windows使用VMware Workstation Pro安裝 MacOS教程
    本文適用於Windows7/10 使用VMware Workstation Pro15.5.0安裝macOS虛擬系統教程
  • Vmware Tools:一件優秀的"初"門裝備!
    同樣地,想要在嵌入式開發過程中得心應手,必須首先要為系統安裝增強性能的工具,那就是Vmware Tools。       我經常聽到學生說:」老師,我的Ubuntu的共享目錄用不了,咋辦咋辦!」,其實共享目錄用不了,那就只有一個原因,就是Vmware Tools沒有安裝或者安裝失敗了,那麼如何安裝Vmware Tools呢?請看:1.
  • 虛擬機VMware 安裝Mac Os10.14教程
    VMware安裝Windows和Linux比較類似,相對於今天要安裝的MAC OS來說過程也比較簡單。
  • 圖文教程|虛擬機中CentOS系統安裝+設置共享文件夾+VMware Tools安裝詳細教程
    1.演示環境,可以安裝各種演示環境,便於做各種例子2.保證主機的快速運行,減少不必要的垃圾安裝程序,偶爾使用的程序,或者測試用的程序在虛擬機上運行3.避免每次重新安裝,銀行等常用工具,不經常使用,而且要求保密比較好的,單獨在一個環境下面運行4.想測試一下不熟悉的應用,在虛擬機中隨便安裝和徹底刪除5.體驗不同版本的作業系統,如Linux
  • 虛擬機VMware的安裝教程
    各類儀器的測試、分析教程為主,包括光電子能譜、高分辨質譜、粉末衍射、單晶衍射、核磁共振等,進入公眾號主頁菜單可以按儀器分類查看需要的教程很多小夥伴安裝軟體(包括avantage、xpspeak、shelx、peakfit等)時會出現各種問題,有可能是殺毒防火牆問題,如果殺毒防火牆關閉還不能解決,有可能與系統有關,這時最簡單的辦法就是重買電腦,資金有限可以安裝虛擬機,今天介紹虛擬機的安裝,後臺回復虛擬機獲取安裝包,也可以直接官網下載。
  • 虛擬機VMware 安裝deepin linux教程
    既然是這麼好看又實用的系統,就讓我們一起去看看如何安裝。安裝條件:請確保你的環境滿足以上要求,否則將無法安裝。安裝過程:1:打開虛擬機,選擇「創建新的虛擬機」,這次我選擇自定義模式5:安裝位置默認是在c盤的,由於文件會很大,建議換到其他盤
  • vmware esxi 5.5安裝教程
    ESXi是vmware推出的一款優秀的伺服器級別的虛擬機,只要硬體條件可以達到臺式機筆記本也可以安裝,不限制虛擬機數量,安裝硬體要求內存必須4G
  • VMware下Ubuntu16.04鏡像完整安裝配置教程
    軟體下載下載ubantu16.04鏡像源清華鏡像->獲取下載連結->選擇桌面版在這裡插入圖片描述VMware Workstation 15 Pro 下載安裝下載官網:https://www.vmware.com/cn/products/workstation-pro/workstation-pro-evaluation.html
  • VMware 的安裝詳解
    Workstation Pro 12 的圖文教程,簡單易學!1.1 下載VMware 虛擬機的官方下載地址:https://www.vmware.com/cn.html,進入該網站後,依次點擊「下載」--> 「Workstation Pro」,即可進入下載頁面。
  • VMware安裝MacOS
    VMware安裝首先下載 VMware Workstation Pro官方網站:https://www.vmware.com/cn/products/workstation-pro/workstation-pro-evaluation.html下載VMware Workstation
  • VMware虛擬機裝 MacOS 10.14系統安裝教程
    9. 軟體正在安裝,請耐心等待,謝謝。安裝結束安裝完畢,完成退出。運行完畢後會發現多了backup和tools兩個文件夾。所謂的backup可以在之後升級unlocker的時候先卸載原有的patch,下載新版unlocker再次patch。
  • 虛擬機VMware Workstation 安裝教程
    很多開發上使用Linux系統會更加方便,有時安裝包在win10上會出現各種bug,但在Linux上使用就很順暢。
  • 安裝和激活 VMware workstation
    1 下載直接去官網 https://www.vmware.com/cn.html下載這裡給出 VMware Workstation Player 的連結https://my.vmware.com/cn/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/14_0
  • VMware 8軟體安裝包以及安裝教程
    連結:https://pan.baidu.com/s/1NivKIi8uAHb3o7N2suTEZQ密碼:zfw5安裝步驟
  • VMware Workstation虛擬機安裝教程
    具體配置要求如下:(注意:本文安裝使用的是Workstation 16,Workstation 16無法在windows7上進行安裝)本文將在windows 10上安裝VMware Workstation 16VMware Workstation 16下載地址如下:VMware