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

参考链接

https://blog.csdn.net/weixin_41956627/article/details/108560790


VMware虚拟机共享Windows目录
https://www.hechunyu.com/archives/vmwarexu-ni-ji-gong-xiang-windowsmu-lu
作者
chunyu
发布于
2021年12月23日
许可协议