VMWare虚拟机与windows共享目录

1、先在虚拟机设置本地共享路径

设置名称和windows主机路径对应关系
在这里插入图片描述

2、登录虚拟机执行vmware-hgfsclient

查看可共享的名称,就是第1步设置的名称

[hadoop@node01 ~]$ vmware-hgfsclient
testdata

3、执行vmhgfs-fuse .host:/名称 vm路径 -o allow_other

[hadoop@node01 ~]$ vmhgfs-fuse .host:/testdata /data/win10datas/ -o allow_other
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
[hadoop@node01 ~]$ 
[hadoop@node01 ~]$ sudo vi /etc/fuse.conf 
[hadoop@node01 ~]$ cat /etc/fuse.conf 
# mount_max = 1000
user_allow_other
[hadoop@node01 ~]$ vmhgfs-fuse .host:/testdata /data/win10datas/ -o allow_other

1、其中testdata 是第一步设置的名称, /data/win10datas/ 是你要在虚拟机中设置的映射的路径。 其他是固定写法;
2、有报错提示时,按提示修改,取消/etc/fuse.conf文件中user_allow_other前面的注释,再次执行上述命令;

4、可以使用相关目录下的文件了

[hadoop@node01 ~]$ ll /data/win10datas 
total 4
drwxrwxrwx. 1 root root 4096 Jul 26 01:25 aa
drwxrwxrwx. 1 root root    0 Jul 26 01:25 bb

5、参考

https://blog.csdn.net/hlttlcooL123/article/details/105123864/

https://www.cnblogs.com/93bok/p/12425259.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值