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 [root@jankin hgfs]# mount -t vmhgfs .host:/  /mnt/hgfs
 2 Error: cannot mount filesystem: No such device
 3 [root@jankin 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 [root@jankin hgfs]# vmhgfs-fuse .host:/ /mnt/hgfs
43 [root@jankin hgfs]# cd /mnt/hgfs/Thunder/

4.此时进入/mnt/hgfs就能看到你设置的共享文件夹了。Enjoy!

猜你喜欢

转载自www.cnblogs.com/Jankin-Wen/p/10157244.html