You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mount.drvfs fails to mount virtualbox shares #2896
mounting any "native" drive with a command like the following works fine:
mount -t drvfs D: /files
However I run Windows 10 in Virtual Box and want to mount a shared Folder, it will mount using the above command without any errors.
But then no access is possible:
ll /files/
ls: reading directory '/files/': Invalid argument
total 0
How would I be able to access that share from within the Ubuntu shell?
Is there another way of doing it or is it a bug in mount.drvfs?
(I also tried installing guest addtions on WSL and mount -t vboxsf ... but as I expected, that won't work either)
EDIT:
Actually I can cd into a subdirectory at that mount.
But still can't list the content using ls also echo * doesn't seem to work it just echos a literal '*'.
Issuing a git status inside a git repo within that share will show every file as changed.
This doesn't seem to provide any useful functionality.
Reacted by John Buxton, rockandska, mixmastamyk, Jacob Svensson, tzontron, Lukas Neubert, Daryl Tucker, Jonah Hoffman, Rico Picone, Andreas and 1 more
Similar to #2163#579 and ill-fated #1962 etc. drvfs supports some NT filesystem drivers (ntfs.sys, cdfs.sys, yadda) but not some other third party drivers. Work around for the time being would be to export your filesystem in the host OS with SMB/CIFS and then mount -t drvfs '\\host\share'.
I've already mounted the virtualbox share onto the Windows 10 VM via the Windows vboxsf driver (installed with guest additions) - I can see it as "Z:" and see all of the files within. Given that the files are already available to Windows, why should WSL need it's own virtualbox driver in order to see the files ? This approach would mean that WSL is going to need it's own driver for every single filesystem type, even though Windows can already see the files.
Reacted by Kevin Kemper, mixmastamyk, Daryl Tucker, Andreas and Dusan Slijepcevic
Same problem here. Windows 10 is my guest operating System. I'm running WIndows 10 on top of VirtualBox. I have a VirtualBox shared folder (from my host operation system) available as \\vboxsrv\jgr mounted as G:.
On Windows 10 bash:
jgr@berlin:~$ sudo mkdir /mnt/g
jgr@berlin:~$ sudo mount -t drvfs '\\vboxsrv\jgr' /mnt/g
jgr@berlin:~$ ls -l /mnt/g
ls: reading directory '/mnt/g': Invalid argument
total 0
jgr@berlin:~$ sudo umount /mnt/g
jgr@berlin:~$ sudo mount -t drvfs G: /mnt/g
jgr@berlin:~$ ls -l /mnt/g
ls: reading directory '/mnt/g': Invalid argument
total 0
jgr@berlin:~$
Reacted by Chris Barth, Maciej Matuszak, ziggy90127, Jacob Svensson, sea-hole and Andreas
I don't work at MSFT and don't know the answer to that anymore than anyone else here (and even if I did, the WSL team doesn't provide roadmaps). Actually I submitted #2163 not because I have any particular desire to mount WebDAV drives (I really don't), but in the hopes someone would take a look and make WSL more tolerant of various installable filesystem drivers (starting with closed source filesystems written at MSFT).
Another way to attack this would be to take a look at the VirtualBox guest addition driver, debug what is going wrong, and add support for WSL. Doable.
Update from #6556, the mount succeeds on WSL1 19042.746, but still no list stuff. That supposition above from Reid just above is almost certainly correct. Ref #6063.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Activity
therealkenc commentedon Jan 31, 2018
Similar to #2163 #579 and ill-fated #1962 etc.
drvfssupports some NT filesystem drivers (ntfs.sys, cdfs.sys, yadda) but not some other third party drivers. Work around for the time being would be to export your filesystem in the host OS with SMB/CIFS and thenmount -t drvfs '\\host\share'.lqueryvg commentedon Apr 21, 2018
This seems very strange to me.
I've already mounted the virtualbox share onto the Windows 10 VM via the Windows vboxsf driver (installed with guest additions) - I can see it as "Z:" and see all of the files within. Given that the files are already available to Windows, why should WSL need it's own virtualbox driver in order to see the files ? This approach would mean that WSL is going to need it's own driver for every single filesystem type, even though Windows can already see the files.
jgrocha commentedon Feb 17, 2019
Same problem here. Windows 10 is my guest operating System. I'm running WIndows 10 on top of VirtualBox. I have a VirtualBox shared folder (from my host operation system) available as
\\vboxsrv\jgrmounted asG:.On Windows 10 bash:
cjbarth commentedon Feb 27, 2019
Here is a workaround:
sudo mkdir /mnt/hsudo mount -t drvfs H: /mnt/hsbraz commentedon Mar 19, 2019
Hello therealkenc, are there any plans to support this in the near future? Having to share the folder from the host is a bit cumbersome.
therealkenc commentedon Mar 19, 2019
I don't work at MSFT and don't know the answer to that anymore than anyone else here (and even if I did, the WSL team doesn't provide roadmaps). Actually I submitted #2163 not because I have any particular desire to mount WebDAV drives (I really don't), but in the hopes someone would take a look and make WSL more tolerant of various installable filesystem drivers (starting with closed source filesystems written at MSFT).
Another way to attack this would be to take a look at the VirtualBox guest addition driver, debug what is going wrong, and add support for WSL. Doable.
ziggy90127 commentedon Feb 24, 2020
Cygwin mounts virtualbox shares without doing anything. Why is WSL struggling with this?
mrnerdhair commentedon Oct 8, 2020
On WSL2, I would guess that this is caused by the same phenomena as dokan-dev/dokany#932.
therealkenc commentedon Feb 16, 2021
Update from #6556, the mount succeeds on WSL1 19042.746, but still no list stuff. That supposition above from Reid just above is almost certainly correct. Ref #6063.
ziggy90127 commentedon Feb 16, 2021
Well, it's been a year, and apparently this is still an issue. I'd like to hear from a Microsoft employee when they plan on addressing this issue.
microsoft-github-policy-service commentedon Feb 1, 2024
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!