VMware Tools 安裝教程

2021-03-02 編程那些年

 

前言

    通常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 安裝Mac Os10.14教程
    VMware安裝Windows和Linux比較類似,相對於今天要安裝的MAC OS來說過程也比較簡單。
  • Vmware Tools:一件優秀的"初"門裝備!
    同樣地,想要在嵌入式開發過程中得心應手,必須首先要為系統安裝增強性能的工具,那就是Vmware Tools。       我經常聽到學生說:」老師,我的Ubuntu的共享目錄用不了,咋辦咋辦!」,其實共享目錄用不了,那就只有一個原因,就是Vmware Tools沒有安裝或者安裝失敗了,那麼如何安裝Vmware Tools呢?請看:1.
  • 在 Linux 上安裝 VMware 工具 | Linux 中國
    了解如何在 Ubuntu 和其它 Linux 發行版上安裝 VMware 工具。在先前的教程中,你學習了在 Ubuntu 上安裝 VMware 工作站。你還可以通過安裝 VMware 工具進一步提升你的虛擬機功能。如果你已經在 VMware 上安裝了一個訪客機系統,你必須要注意 VMware 工具的要求 —— 儘管並不完全清楚到底有什麼要求。
  • vmware虛擬機安裝教程(xp/win7版)
    虛擬機安裝教程相對也是比較簡單的,下面大家跟隨系統重裝小編這篇虛擬機安裝教程,一起來學習下怎麼安裝vmware虛擬機中文版!教程步驟較多,跟緊小白不會錯。為了可以兼容xp/win7(32、64)位系統,大家先下載一個win7虛擬機中文掃碼回覆:虛擬機下載好後解壓出來,第一個文件是激活碼,暫時先不用,待安裝後再使用,雙擊安裝包開始安裝
  • 如何在vmware workstation player虛擬機上安裝VMware Tools工具
    版本:vmware workstation 16 player & ubuntu 64位。
  • 虛擬機VMware安裝windows系統最全教程
    FB8C05DE594CD7E58D88993652DD2102|/ed2k://|file|cn_windows_10_consumer_editions_version_1803_updated_march_2018_x86_dvd_12063452.iso|3480692736|0EC3C40EF13D772798209981F18B6A5D|/🔥 安裝教程
  • 虛擬機VMware安裝macOS Catalina 10.15
    PC機安裝蘋果系統有兩種方法:一種是用U盤製作雙系統,還有一種是利用虛擬機安裝。新手的話不建議第一種方法,很容易出錯,因此我是用虛擬機安裝的。經過一天的摸索,我終於用VMware 安裝上了macOS。有興趣的小夥伴可以按照本教程進行安裝,建議所有軟體和我下文所給的一樣,不然容易出錯。
  • 虛擬機VMware 16 下載-->安裝-->激活
    ):https://download3.vmware.com/software/wkst/file/VMware-workstation-full-15.0.4-12990004.exehttps://download3.vmware.com/software/wkst/file/VMware-workstation-full-15.5.0-14665864.exe
  • VMware虛擬機安裝Mac OS X和Windows 10系統詳細教程
    歡迎來到小小課堂每天一個原創IT教程▼據說是全屏觀看有驚喜哦安裝 Windows 10 系統DVD 驅動器中放入安裝版 Win10 系統,按照提示一步一步即可安裝完成。激活軟體激活系統(XP 需要在安裝過程中輸入密鑰)。完成之後,創建一個快照,或者進 PE 備份一次系統。
  • 虛擬機VMware安裝蘋果系統macOS,超級詳細教程,附文件下載,真教程!!
    3.特別聲明 以下教程是小編總結許多網絡大能的操作視頻及教程,然後與實踐後寫出此文,感謝各位大佬的分享,前人栽樹後人乘涼,同時希望大家多多支持我的公眾號科技毒瘤君。4.安裝系統選擇Apple Mac OS X 選項,沒有解鎖成功的不會顯示,請查看上面的教程繼續解鎖。
  • 虛擬機vmware安裝openwrt系統圖文教程
    如果在安裝openwrt的過程中出現下圖就說明沒有設置,或者設置了而沒有保存。vmware的安裝我們來到虛擬機軟體vmware的官網,下載最新的版本15.5,安裝過程就不講了,傻瓜式的就行,這裡貼幾個可用的註冊碼,均來自於網絡。
  • VMware虛擬機安裝教程打造一機多系統(乾貨收藏)
    今天小楊給大家做一個VMware虛擬機安裝系統的一個安裝教程,打造一機多系統的玩法,虛擬機的用途大家都應該清楚可以安裝不同系統,比如Win XP
  • Win10虛擬機VMware安裝黑蘋果MacOS Sierra圖文教程
    不解鎖就不需要看下面的教程了。 (7)最後我們就需要慢慢等待安裝完成了,先去泡杯茶喝著慢慢等以上就是虛擬機VMware安裝黑蘋果macOS Sierra詳細圖文教程。 懶人包鏡像說明安裝注意事項原版dmg鏡像只能安裝在GPT分區格式的硬碟上;懶人版cdr鏡像可以安裝在MBR格式和GPT分區格式的硬碟上
  • VMware安裝Android x86虛擬機,實現在PC電腦上運行安卓系統
    在日常的使用中,有時需要在PC機上模擬安裝運行安卓系統,如果你的電腦中安裝有vmware或者VirtualBox虛擬機。
  • 【教程】基於Hyper-v平臺的 Windows 封裝系列教程
    、導出和備份虛擬機及系統分區;PE下第二部分封裝及創建還原點、系統備份;格式化虛擬機C盤並重新應用封裝好的wim映像;測試尋找bug;後續總結(下一套教程:作業系統精簡及office定製——作業系統批量部署即MDT合SCCM入門)。
  • VMware Workstation 軟體安裝及序列號
    4、選擇VMware安裝位置,然後點擊下一步。7、點擊安裝。8、等待安裝完成,然後點擊許可證序列號。創建虛擬機點擊「創建新的虛擬機」(首次打開頁面應該為下圖),或者點擊菜單欄左上角「文件」按鈕,選擇第一項新建虛擬機或者快捷鍵 Ctrl+N,然後就可以根據提示新建自己的第一個虛擬機了參考:vmware新建安裝
  • 手把手教你安裝Ubuntu系統增強工具
    1、在Ubuntu虛擬機處於關機狀態的時候,當看到界面彈出VMware增強工具的安裝提示,此時點擊「安裝Tools」,爾後點擊「開啟虛擬機」,進入Ubuntu系統。9、此時在home目錄下多了一個名為vmware-tools-distrib的文件夾,如下圖所示。
  • VMware虛擬機安裝Win10系統教程
    系統的可靠性和易用性持懷疑態度,那麼這時候使用虛擬機安裝體驗Win10系統無疑是最好的選擇。在Windows系統中,大家最常用的就是VMware虛擬機了,所以下面MS酋長就來演示一下VMware虛擬機安裝Win10系統的詳細方法步驟:步驟一:下載安裝VMware虛擬機建議大家下載使用免費的VMware Workstation Player即可,功能足夠我們普通用戶使用。
  • 在VMware虛擬機中安裝中文版Win7
    在不改變原系統的情況下,我們還可以用虛擬機來安裝其他的作業系統。本篇文章介紹的就是在vmware虛擬機中安裝Win7系統 安裝步驟:  1.下載安裝vmware虛擬機軟體。  2.創建一臺虛擬機。[page_break]  3.vmware中將windows7安裝鏡像載入虛擬機光碟機。
  • 【技術原創】滲透基礎——利用VMware Tools實現的後門
    0x00 前言在滲透測試中,我們經常會碰到Windows虛擬機,這些虛擬機往往會安裝VMware Tools,利用VMware Tools的腳本執行功能可以實現一個開機自啟動的後門。利用思路VMware Tools的腳本執行功能支持在以下四種狀態時運行:◼power,開機狀態◼resume,恢復狀態◼suspend,掛起狀態◼shutdown,關機狀態可以選擇以下兩種方法進行配置腳本執行的功能:1.使用VMwareToolboxCmd.exe默認安裝路徑