Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian 9 - VMware Fusion 10 won't work with shared folders #199

Open
kbreit opened this issue Oct 7, 2017 · 34 comments

Comments

@kbreit
Copy link

@kbreit kbreit commented Oct 7, 2017

I have VMware Fusion 10 on macOS High Sierra (10.13) and I am unable to
share folders between my Mac and fresh Debian 9 installation. It worked
fine in Debian 8 but I'm receiving problems in Debian 9. If I run mount
-t vmhgfs .host:/ /mnt/hgfs/ I receive an error:

Error: cannot mount filesystem: No such device

I was able to get it working once by disabling and enabling the shared
folder functionality, but after a reboot of the Debian guest, I am no
longer able to get this working. At best it isn't working reliably.

@jonathanvmw

This comment has been minimized.

Copy link
Contributor

@jonathanvmw jonathanvmw commented Oct 10, 2017

An internal bug has been filed for this issue. Thanks for reporting it.

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 10, 2017

Hi there,

I am the main developer for the shared folders feature.
A couple of points to make about the upgrade and differences to getting shared folders feature to keep working.
Debian 8 is kernel: Linux 3.16
Debian 9 is kernel : Linux 4.9

This impacts the Shared Folders client as we have switched from a kernel mode component to a FUSE file system component to provide the Shared Folders file system.

This results in a new mount command to be used for creating the shared file system.
For Linux kernel versions we use the FUSE file system which will now mean you should be using the following command:

sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

Check that the folder /mnt/hgfs exists first and if not then first do the command:

sudo mkdir /mnt/hgfs

When enabling the Shared Folders feature from the user interface menu it should automatically cause the above steps to be done for you. However, that does depend on the version of tools you have installed and are running.

To obtain the version of tools can you do the following:
/usr/bin/vmware-toolbox-cmd -v

And report the results here. Also for good measure can run the following:

/usr/bin/vmhgfs-fuse --version

and report the output here too.

I hope this helps to get you going again.
Steve

@kbreit

This comment has been minimized.

Copy link
Author

@kbreit kbreit commented Oct 10, 2017

I have tried the Fuse method and it does seem to be working better. Getting auto-mount working with the proper permissions has been a problem but something I need to work through more.

Because Fuse is a different mounting method than the previous kernel modules, are there plans to have updated documentation on vmware.com? I saw documentation for the old method and the VMware compatibility tool showed Debian 8 compatibility but not Debian 9. These may be outside of your responsibility, but it would likely prove useful for others.

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 10, 2017

Yes, we should provide some improved documentation around this with something akin to a knowledge base article.

I will check if anything like this exists but there should be some details in the release documents of the newer tools releases.

It would help me if you could report the above information I mentioned about so I can tell the versions you have installed so I can tell if we have made improvements since then or not.

Thanks
Steve

@kbreit

This comment has been minimized.

Copy link
Author

@kbreit kbreit commented Oct 12, 2017

vmware-toolbox: 10.1.5.59732 (build-5055683)
vmhgfs-fuse: 1.6.5.0
FUSE library: 2.9.7
fusermount: 2.9.7
FUSE kernel interface: 7.19

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 12, 2017

Thanks for the version information I will add this to the bug and now we have a documentation bug that is connected to it too.

This will mean in the next release and beyond this will be documented appropriately so we don't waste your or anyone else's time.

Also note, to determine which client will be used by our tools do the following:
/usr/bin/vmhgfs-fuse --enabled
It will tell you what to expect - if it succeeds then FUSE is used otherwise the kernel client as previous versions and the mount command will be used.

You can run the FUSE client on earlier (pre-version 4.0 kernel) systems if you so choose and want to try it instead or as well as relying on the kernel client but the tools themselves will expect to use the kernel client. It is just not officially supported by VMware in those scenarios.

Steve

@klowenst

This comment has been minimized.

Copy link

@klowenst klowenst commented Nov 29, 2017

kbreit - have you been able to auto-mount? Have been mucking with fstab to no avail

@kbreit

This comment has been minimized.

Copy link
Author

@kbreit kbreit commented Nov 29, 2017

I haven't gotten auto-mounting to work. I wrote an fstab entry and it prevented my system from booting. Instead, I created a script which runs on login and only sometimes works, but I can at least get it working with a rain dance.

@klowenst

This comment has been minimized.

Copy link

@klowenst klowenst commented Nov 29, 2017

I almost have it (I think) but can only view using sudo.
.host:/ /mnt/hgfs fuse.vmhgfs-fuse rw,user,exec,umask=000 0 0
if I run
ls -al /mnt
ls: cannot access '/mnt/hgfs': Permission denied
total 8
drwxr-xr-x 3 root root 4096 Nov 28 12:41 .
drwxr-xr-x 23 root root 4096 Jun 28 2013 ..
d????????? ? ? ? ? ? hgfs

sudo ls -al /mnt
total 13
drwxr-xr-x 3 root root 4096 Nov 28 12:41 .
drwxr-xr-x 23 root root 4096 Jun 28 2013 ..
drwxrwxrwx 1 root root 4192 Nov 29 10:21 hgfs

@klowenst

This comment has been minimized.

Copy link

@klowenst klowenst commented Nov 29, 2017

got it - I added the following to fstab and all shared folder showing under 'mac' directory
.host:/ /mnt/hgfs/mac fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Nov 29, 2017

Sorry for not helping, I just got looked at this.
Yes, it looked like you were missing the "allow_other" option which if missed will not allow everyone access.
(With allow_other, the volume will be accessible normally to all users, but usual permission checks will of course apply. Note that allow_other is a privileged option in that it can only be used by either the superuser.)

Thanks for updating the thread.
Steve

@kbreit

This comment has been minimized.

Copy link
Author

@kbreit kbreit commented Dec 4, 2017

I'm still having problems with this. Here's my mount command. I'm getting an error it can't mount /mnt/hgfs

.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_umount,defaults 0 0

My goal is to preferably mount all shares in /mnt/hgfs/

@klowenst

This comment has been minimized.

Copy link

@klowenst klowenst commented Dec 4, 2017

I had the same problems trying to mount /mnt/hgfs. What I did was create a directory under /hgfs (called it mac - as was sharing all files from my mac). After I did this all existing shares and new ones I created show up under /mnt/hgfs/mac. I have basically the same line in fstab except added /mac
.host:/ /mnt/hgfs/mac fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0

@kbreit

This comment has been minimized.

Copy link
Author

@kbreit kbreit commented Dec 11, 2017

I added a mac directory to the mount point and it worked fine. This is a requirement I would like to see added to future documentation.

@xavier-villelegier

This comment has been minimized.

Copy link

@xavier-villelegier xavier-villelegier commented Apr 28, 2018

Just to confirm that sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other worked like a charm for me

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented May 8, 2018

The fstab line entry I have used and worked for me:
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0

Can try that and let me know how that goes?
Thanks
Steve

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented May 8, 2018

Note, you can modify the mount path to "/mnt/hgfs/mac" for your scenario.

@volcan01010

This comment has been minimized.

Copy link

@volcan01010 volcan01010 commented May 23, 2018

I can confirm this /etc/fstab entry works with Ubuntu 18.04. (I realise this bug is tagged for Debian, but this is where Google brought me).

It mounts as my user id and uses umask to remove write privilege from 'all' users.

.host:/dev      /home/ubuntu/dev fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,umask=0002,auto_unmount,defaults 0 0
@kunKun-tx

This comment has been minimized.

Copy link

@kunKun-tx kunKun-tx commented Jun 28, 2018

@lousybrit
Can confirm vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0 works for my env.

Host: Win7
VM: Debian 9
open-vm-tools: 10.1.5.59732
FUSE: 2.9.7

@rawtaz

This comment has been minimized.

Copy link

@rawtaz rawtaz commented Sep 21, 2018

I'm borrowing this thread a bit, as part of trying to get shared folders working properly on NixOS.

I've seen a number of different formats/syntax for the fstab and manual mount, but it's highly unclear to me which one is the right and recommended one, with open-vm-tools 10.3.0.

@lousybrit wrote that he's using and fstab with vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0 - vmhgfs-fuse as the device and just fuse as the type. @kunKun-tx verified this works for him as well.

At the same time @lousybrit wrote earlier that sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other is the command to use when mounting manually, suggesting .host:/ as the device and vmhgfs-fuse as the type. @xavier-villelegier verified this works for him.

@klowenst wrote that .host:/ /mnt/hgfs/mac fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0 in fstab works for him, which means .host:/ as device and fuse.vmhgfs-fuse as type (which in the end seems to translate to the binary vmhgfs-fuse being used to do the mounting, so in a way it's similar to previous suggestions). @volcan01010 verified this works for him too, through .host:/dev /home/ubuntu/dev fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,umask=0002,auto_unmount,defaults 0 0 in fstab.

Personally I've tested pretty much all combinations of device and type syntax you can think of, and while I got both fstab and manual mounting to work, there's still a lot to figure out before I manage to reach a conclusion on what to do to make this work without hackery on NixOS. Knowing that syntaxes should work will help me aim for the right thing when debugging.

@lousybrit Can you tell us, once and for all, the following, in the context of using open-vm-tools 10.3 and the FUSE way of mounting shared folders from Fusion in Linux:

  1. What is the proper and recommended syntax for device, type and any required options, when writing an fstab entry?
  2. What is the proper and recommended syntax for binary, device, type and any required options, when mounting manually on the command line?
  3. Aside from the above, are there other syntaxes that are supported and expected to work?
  4. If so, which ones, and how do they differ from the primary/recommended ones, and is there any time we should use these instead?
  5. Also, what are the requirements for shared folders being automatically mounted on boot and when you enable them in the VM settings - what process needs to run and does it need any specific configuration?

Thanks!

@rawtaz

This comment has been minimized.

Copy link

@rawtaz rawtaz commented Oct 12, 2018

@lousybrit Any chance you can answer these questions?

@pavel-odintsov

This comment has been minimized.

Copy link

@pavel-odintsov pavel-odintsov commented Oct 16, 2018

@lousybrit thank you SO MUCH for your move to fuse! I owe you beer :) Kernel modules were persistent headache for me.

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 16, 2018

Sorry for the delay lots on my plate,
I will update shortly.

Steve

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 17, 2018

There are 2 ways to specify the Shared Folders mounts persistently in /etc/fstab
Below there are both samples /etc/fstab line to mount a FUSE vmhgfs export.

Method 1: Specifying the file system

<file system> <mount point> <type> <options> <dump> <pass>

Replace <file system> with vmhgfs-fuse.
Replace <mount point> with the local file system on which the exported directory is mounted, which default replacement is to use /mnt/hgfs
Replace <type> with fuse.
e.g.
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0

Method 2: Specifying the remote server and share

<server>:</remote/export> </local/directory> <fuse-type> <options> <dump> <pass>
Replace <server> with the hostname .host the shared folders name of the host server exporting the hosts file system.
Replace </remote/export> with the path to the exported directory which defaults to/or you can use the /share-name-you-created.
Replace </local/directory> with the local file system on which the exported directory is mounted, which defaults to /mnt/hgfs.
Replace <fuse-type> with fuse.vmhgfs-fuse.
Eg.
.host:/ /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other 0 0

Finally, you can use either format you should be fine.
The first I would say is the general way to mount the Shared Folders shares under the directory you chose.
If you wanted to just have one shared folder and so skip over the name you can use the method 2 and mount the remote path server and share as .host:/yoursharename. You will not see the shared folder name in the file paths in this instance.

Hope this helps!
Steve

@soupdiver

This comment has been minimized.

Copy link

@soupdiver soupdiver commented Oct 30, 2018

Since the issues are known for more than a year now... can someone tell when this will work out of the box?
I mean this is quite an essential feature and if the solution is already known I wonder why people still have to dig through github issues to get their shared folders working

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Oct 31, 2018

Hi Soupdiver,

It should just work out of the box.

The initial issue reported here was the user trying to use an incorrect mount command. The user used the mount command for the vmhgfs kernel mode client, which had been replaced from older tools versions and kernel versions to the newer Linux kernels that the VMware Tools supported fuse based clients. The Fuse based client mount is used now for Debian 9 and if sharing is enabled through the UI will mount the shared folders automatically for you.

If this isn't what you see or have some scenario which does not work for you, please state it and I will look into it.

Thanks
Steve

@soupdiver

This comment has been minimized.

Copy link

@soupdiver soupdiver commented Nov 2, 2018

I thought it was intended to work out of the box via vmwaretoolsd (or what the name of this was)?
Or is the mounting intended to be done manually?

@lousybrit

@CiraciNicolo

This comment has been minimized.

Copy link

@CiraciNicolo CiraciNicolo commented Nov 15, 2018

The fix proposed by @klowenst don't work on Debian 9.5 with Mojave, any idea?

@klowenst

This comment has been minimized.

Copy link

@klowenst klowenst commented Nov 15, 2018

I'd given up on this for a while but recently installed Debian 9.5 on Mojave OSX. I installed open-vm-tools and then vmware tools. Then turned on sharing in VM and added my home directory

Access to host files is in /mnt/hgfs/'home dir'

copied vmwaretools CD to /tmp . ran these command (from bash history)
9 sudo apt update
10 sudo apt install open-vm-tools
11 sudo apt install open-vm-tools-desktop
12 cd /tmp
13 ls
14 tar -zxvf VMwareTools-10.3.2-9925305.tar.gz
15 ls
16 cd vmware-
17 cd vmware-tools-distrib/
18 ls
19 sudo ./vmware-install.pl
20 sudo reboot

@alexcohn

This comment has been minimized.

Copy link

@alexcohn alexcohn commented Nov 21, 2018

host: Windows 10, 64-bit (Build 17134) 10.0.17134
vm: VMware® Workstation 15 Player 15.0.1 build-10737736
guest: Ubuntu 18.04.1 LTS 64-bit

The .host syntax did not work;
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0
saved my day.

@pbadams

This comment has been minimized.

Copy link

@pbadams pbadams commented Jan 30, 2019

Ran into this issue (original post) today on CentOS 7.6 running in VMware Fusion Professional 10.1.5 on macOS 10.14.3 (Mojave).

mount -t vmhgfs .host:/ /mnt/hgfs/

I receive an error:

"Error: cannot mount filesystem: No such device"

CentOS 7.6 has these packages installed via yum:

open-vm-tools-10.2.5-3.el7.x86_64
open-vm-tools-desktop-10.2.5-3.el7.x86_64

Used this to successfully mount host folders:
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

Can this get fixed, please?

@johnwvmw

This comment has been minimized.

Copy link
Contributor

@johnwvmw johnwvmw commented Jan 30, 2019

@pbadams Can you please elaborate what "this issue" is that you would like fixed. The only detail is that the mount succeeded.

Thanks.

@pbadams

This comment has been minimized.

Copy link

@pbadams pbadams commented Jan 31, 2019

Updated posting above ^

@lousybrit

This comment has been minimized.

Copy link

@lousybrit lousybrit commented Feb 1, 2019

With the newer kernel releases, we now use the FUSE client, not a kernel mode client.
So you don't need to build the vmhgfs kernel module and have all the kernel build env installed when installing tools.

The mount is different due to the FUSE file system and not the mount for the old vmhgfs file system.

For more details see https://kb.vmware.com/s/article/60262?lang=en_US

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.