首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在WSL2中装载vmware共享文件夹

如何在WSL2中装载vmware共享文件夹
EN

Stack Overflow用户
提问于 2021-02-25 18:41:46
回答 1查看 181关注 0票数 0

我有一台Mac,通过vmware fusion安装了一个主机虚拟机,Mac和Win10虚拟机之间的共享文件夹使用驱动器号Z:或\vmware- Win10

我将网络地址\192.168.111.49\Builds映射到驱动器号Y:

然后在Win10虚拟机中安装WSL2,并在linux子系统Ubuntu20.04LTS中进行安装

我想挂载Ubuntu中的所有驱动器号,C: is automatically mount /mnt/c

我使用这些cmd来挂载Y:

代码语言:javascript
运行
复制
sudo mkdir /mnt/y
sudo mount -t cifs -o username=xxx,password=xxxx,domain=xxx //192.168.111.49/Builds /mnt/y

没问题的

但是,当我尝试挂载Z:时,它不工作

代码语言:javascript
运行
复制
# from vmware official site
$ sudo vmhgfs-fuse -d .host:/ /mnt/z -o subtype=vmhgfs-fuse,allow_other
Segmentation fault (core dumped)

# try to use drvfs
$ sudo mount -t drvfs Z: /mnt/z
mount: /mnt/z: special device Z: does not exist.
<3>init: (457) ERROR: UtilCreateProcessAndWait:489: /bin/mount failed with status 0x2000
<3>init: (457) ERROR: MountPlan9:478: mount cache=mmap,rw,trans=fd,rfdno=3,wfdno=3,msize=65536,aname=drvfs;path=Z:;symlinkroot=/mnt/ failed 2
No such file or directory

# like network address
$ sudo mount -t cifs -o username=xxx,password=xxx //vmware-host/ /mnt/z
mount: /mnt/z: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

我检查了我的open-vm-tools版本

代码语言:javascript
运行
复制
$ sudo apt-get upgrade open-vm-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
open-vm-tools is already the newest version (2:11.1.5-1~ubuntu20.04.2).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

它已经是最新的了。

有什么帮助吗?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2021-03-01 11:07:11

我发现原因是我以管理员的身份运行cmd或powershell。

如果我不使用管理员,下面的挂载是可以的

代码语言:javascript
运行
复制
sudo mount -t drvfs Z: /mnt/z
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66366943

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档