1崖咨、文件夾共享的前提
文件夾共享的前提是画切,必須在 Centos 系統(tǒng)上安裝VMTools工具成功
Centos 6.8 安裝VMTools工具
http://www.reibang.com/p/7fef200113b2
Centos 7安裝VMTools工具
http://www.reibang.com/p/24f84c910690
2拒炎、文件夾共享操作
共享文件夾路徑
[root@hadoop100 ~]# cd /mnt/hgfs
3硅堆、文件夾默認路徑的由來
VMware默認的共享路徑是在/mnt/hgfs沪曙,這是寫死在VMware Tools的腳本里的痘括,我們可以從/etc/init.d/vmware-tools查到
vmhgfs_mnt="/mnt/hgfs"
#Mount all hgfs filesystems"
vmware_mount_vmhgfs() {
if [ "`is_vmhgfs_mounted`" = "no" ]; then
if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
mkdir -p $vmhgfs_mnt
vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
-o subtype=vmhgfs-fuse,allow_other $vmhgfs_mnt"
else
vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt"
fi
fi
}
4歇竟、打完收工
此時在CentOS 7中就能看到物理機上面共享的文件夾了
[root@hadoop121 ~]# cd /mnt/hgfs/
[root@hadoop121 hgfs]# ll
total 4
drwxrwxrwx. 1 root root 4096 Apr 15 10:10 Window-Centos-Shared
[root@hadoop121 hgfs]# cd Window-Centos-Shared/
[root@hadoop121 Window-Centos-Shared]# ll
total 4
-rwxrwxrwx. 1 root root 3005 Nov 27 14:23 website.log