1. 程式人生 > >CentOS7 VMware-Tools安裝與共享資料夾設定

CentOS7 VMware-Tools安裝與共享資料夾設定

一. VMware-Tools安裝

1.載入VMware Tools的光碟機:點選"虛擬機器"->"安裝VMware Tools"。這裡,由於我已經安裝了,所以顯示"更新VMware Tools"。

2.此時,會自動彈出VMware Tools的目錄,如圖。將其中以.tar.gz結尾的壓縮檔案複製到本地的路徑。

3.在複製到的路徑開啟一個終端,輸入tar xvf ***.tar.gz命令進行解壓。

4.進入解壓目錄,以管理員許可權執行vmware-install.pl程式進行安裝:sudo ./vmware-install.pl。

5.所有選項一律使用預設的選擇,一路回車下去即可。

6.Enjoy!

二.共享資料夾設定

1. 開啟虛擬機器——>設定

2.啟用共享資料夾,新增物理機上需要共享的目錄

3.有時候,可能有/mnt/hgfs但沒有共享檔案。解決方法:

 1 [[email protected] hgfs]# mount -t vmhgfs .host:/  /mnt/hgfs
 2 Error: cannot mount filesystem: No such device
 3 [[email protected] hgfs]# yum install open-vm-tools-devel -y
 4 已載入外掛:fastestmirror, langpacks
5 Loading mirror speeds from cached hostfile 6 * base: mirrors.aliyun.com 7 * epel: mirrors.tuna.tsinghua.edu.cn 8 * extras: mirrors.aliyun.com 9 * updates: mirrors.aliyun.com 10 正在解決依賴關係 11 --> 正在檢查事務 12 ---> 軟體包 open-vm-tools-devel.x86_64.0.10.2.5-3.el7 將被 安裝 13 --> 解決依賴關係完成
14 15 依賴關係解決 16 17 ======================================================================================= 18 Package 架構 版本 源 大小 19 ======================================================================================= 20 正在安裝: 21 open-vm-tools-devel x86_64 10.2.5-3.el7 base 157 k 22 23 事務概要 24 ======================================================================================= 25 安裝 1 軟體包 26 27 總下載量:157 k 28 安裝大小:1.0 M 29 Downloading packages: 30 open-vm-tools-devel-10.2.5-3.el7.x86_64.rpm | 157 kB 00:00:00 31 Running transaction check 32 Running transaction test 33 Transaction test succeeded 34 Running transaction 35 正在安裝 : open-vm-tools-devel-10.2.5-3.el7.x86_64 1/1 36 驗證中 : open-vm-tools-devel-10.2.5-3.el7.x86_64 1/1 37 38 已安裝: 39 open-vm-tools-devel.x86_64 0:10.2.5-3.el7 40 41 完畢! 42 [[email protected] hgfs]# vmhgfs-fuse .host:/ /mnt/hgfs 43 [[email protected] hgfs]# cd /mnt/hgfs/Thunder/

4.此時進入/mnt/hgfs就能看到你設定的共享檔案夾了。Enjoy!