如何在 WSL2

问题描述

我有一台 Mac,通过 vmware fusion 安装了 Win10 VM,Mac 和 Win10 VM 之间的共享文件夹使用盘符 Z: 或 \vmware-host

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

然后我在 Win10 虚拟机中安装 WSL2,以及 linux 子系统 Ubuntu 20.04 LTS

我想挂载Ubuntu所有盘符,C:自动挂载/mnt/c

我使用这些 cmd 挂载 Y:

sudo mkdir /mnt/y
sudo mount -t cifs -o username=xxx,password=xxxx,domain=xxx //192.168.111.49/Builds /mnt/y

没关系

但是,当我尝试 mount Z: 时,它不起作用

# 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 版本

$ 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.

它已经是最新的了。

有什么帮助吗?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)