vm虚拟机下centos7挂载windows共享目录
1.虚拟机配置共享目录
选中总是启用

2.安装vmware tools
centos7有该包,可直接安装
yum install open-vm-tools
3.挂载共享目录
#查看共享目录:
vmware-hgfsclient
#挂载:
vmhgfs-fuse .host:/ /mnt/hgfs/
#挂载到其它目录:
mount --bind /mnt/hgfs/F /data/tile
4.开机启动挂载
/etc/rc.local文件(必须有执行权限)中添加:
#延迟15秒,延迟时间自定义。添加延迟是为了更稳定的挂载。
sleep 15
vmhgfs-fuse .host:/ /mnt/hgfs/
mount --bind /mnt/hgfs/F /data/tile
本文来自博客园,作者:tros,转载请注明原文链接:https://www.cnblogs.com/tros/p/15691411.html

浙公网安备 33010602011771号