1. 程式人生 > >基於VM14+ Ubuntu 16.04安裝VMware Tools(VM同主機file互動的工具)以及使用的騷操作...

基於VM14+ Ubuntu 16.04安裝VMware Tools(VM同主機file互動的工具)以及使用的騷操作...

首先,給已經裝好的Ubuntu 16.04換上映像檔案:

9125154-6524f70a95546743.png
在安裝VMware Tools時,需要修改指向VMware Tools所在(VMware Workstation\linux.iso),在這個路徑下有個linux.iso檔案,其中提供了linux作業系統平臺需要的一些工具檔案,當然包括VMware Tools安裝檔案。

現在再進入系統,在VMware選單欄找到如下紅框位置,我這裡安裝好了所以顯示重新安裝,未安裝的時候可以這裡開始第一步,

9125154-7057e776299314e1.png

點選之後會彈出如下虛擬驅動,裡面就有VMware Tools的安裝包(即 * .tar.gz)(下圖截自https://blog.csdn.net/sh21_/article/details/52453493)。

9125154-28689157d36515c0.png

我們直接將這個壓縮包拷到桌面上:

9125154-8091c467afe0ba67.png
接著開啟終端解壓之(-xzvf 後面的路徑可以直接把壓縮檔案拖到終端視窗上然後放開,修整一下路徑即可):

tar -xzvf  /home/.../VMwareTools-10.0.6-。。。.tar.gz

解壓時終端剪影:

9125154-0ec80f3bd4b323fa.png

解壓完畢後,cd進入解壓後的目錄,執行:sudo ./wmware-install.pl 然後基本上一直回車就可以了(看到yes或者no的都輸入yes(如果你英語自覺不錯那也可以自行閱讀詢問後操作),其他的基本上回車就可以了,會輸預設INPUT: [...] default)。

下面是我安裝的剪影:

[email protected]:~$ cd vmware-tools-distrib/
[email protected]
:~/vmware-tools-distrib$ sudo ./vmware-install.pl [sudo] liweipeng 的密碼: 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 ...... 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] yes INPUT: [yes] Initializing... Making sure services for VMware Tools are stopped. Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done 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? [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] VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. This feature can be enabled/disabled by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [yes] yes INPUT: [yes] Thinprint provides driver-free printing. Do you wish to enable this feature? [yes] yes INPUT: [yes] 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.19.6 Distribution provided drivers for Xorg X server are used. Skipping X configuration because X drivers are not included. ...... Enjoy, --the VMware team Found VMware Tools CDROM mounted at /media/liweipeng/VMware Tools1. Ejecting device /dev/sr0 ...

直到出現下面這塊就算安裝成功了:

9125154-4e285afd8be0f844.png
接著關機:
9125154-41f6761974aa21b2.png
回到VMware的介面,點選虛擬機器->設定->選項,
9125154-5bf97749dfcaff40.png
對共享資料夾新增一個本機路徑即可,資料夾可以用來存放共享檔案:

9125154-54a6e6dbb4b8e321.png

接著在Ubuntu中任意點選一個檔案(資料夾可以先壓縮成.tar.gz檔案),Ctrl+C:

9125154-6eac91cb63a2f490.png
然後到主機隨便找個地方,比如共享資料夾,Ctrl+V,就哦了,整個兒直接地便從虛擬機器複製到主機上來,相當好吃:
9125154-696090d532372b82.png





參考博文:
https://www.linuxidc.com/Linux/2016-04/130806.htm
https://www.linuxidc.com/Linux/2016-04/130807.htm
https://blog.csdn.net/sh21_/article/details/52453493