VMware Communities
mdzhao
Contributor
Contributor

VMware shared folder not showing in /mnt/ on Ubuntu guest

I am testing VMware Workstation Pro 16 on Windows 10, and the guest is Ubuntu 22.04 LTS with VMware Tools installed. I configured a shared folder in the context of `VM > Settings`; however, it does not show up in the guest virtual machine's directory of `/mnt/`.

Please let me know if you need more details, and I highly appreciate any hints or suggestions.

A little more details about the settings:

[This YouTube video](https://www.youtube.com/watch?v=W2m3SPolbD4) was about VMware Player. So, I tried the settings on both VMware Workstation Pro and VMware Player, and the results were the same, not working.

In my case, the command `vmware-hgfsclient` was aware of the shared folder, but the directory `/mnt/` was empty, and there was no `/mnt/hgfs/`. See the screenshot below for more details.

Screenshot:

```
root@ubuntu:/home/work/Desktop# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
root@ubuntu:/home/work/Desktop# vmware-toolbox-cmd -v
11.3.5.31214 (build-18557794)
root@ubuntu:/home/work/Desktop# vmware-hgfsclient
my-shared-folder
root@ubuntu:/home/work/Desktop# ll /mnt/
total 8
drwxr-xr-x 2 root root 4096 Apr 19 04:02 ./
drwxr-xr-x 20 root root 4096 May 21 14:14 ../
root@ubuntu:/home/work/Desktop#
```

6 Replies
Technogeezer
Immortal
Immortal

Known issue with any. VMware Tools or open-vm-tools implementation that uses a FUSE client to implement shared folders.

VMware recommends use of open-vm-tools packages when they are provided by the distribution (which is pretty much all Linux distros). VMware Tools for Linux are maintained for use by older Linux distributions that do not provide open-vm-tools. Remove the VMware Tools that you have installed and install the open-vm-tools and open-vm--tools-desktop packages provided by Ubuntu.

A temporary workaround to the problem is to disable, then re-enable Shared Folders in the Workstation GUI while the VM is running. This would have to be done each time the VM is booted, though.

A more permanent solution is to:

  • Open a root shell in the VM
  • Make sure the /mnt/hgfs directory exists. If not, create it.
  • Add the following line to /etc/fstab:
vmhgfs-fuse /mnt/hgfs  fuse defaults,allow_other   0   0

Then reboot your VM. The shared folders should now appear at the mount point /mnt/hgfs

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
mdzhao
Contributor
Contributor

Thank you for your help, @Technogeezer, and I have resolved the issue now.

In addition, I found the below reference in the official document of VMware Tools v11.3.5:

VMware Tools Issues in VMware Workstation or Fusion

  • Shared Folders mount is unavailable on Linux VM.

    If the Shared Folders feature is enabled on a Linux VM while powered off, the shared folders mount is not available on restart.

    Note: This issue applies to VMware Tools running on Workstation and Fusion.

    Workaround:

    If the VM is powered on, disable and enable the Shared Folders feature from the interface. For resolving the issue permanently, edit /etc/fstab and add an entry to mount the Shared Folders automatically on boot.

    For example, add the line:

    vmhgfs-fuse   /mnt/hgfs    fuse    defaults,allow_other    0    0

 

Williams_Nest
Contributor
Contributor

I just added the "permanent" solution to my ubuntu 2023 and it broke

Had to go in maintenance mode and remove the line before I could succsesfully boot it again

0 Kudos
Technogeezer
Immortal
Immortal

Recent. Linux versions have changed the order of startup of services. That causes problems for the permanent solution because services required for the shared folder mount are now not active before the mounts are done.

 this can be fixed, though. Add  _netdev to the mount arguments line in /etc/fstab as follows:

vmhgfs-fuse   /mnt/hgfs    fuse    defaults,allow_other,_netdev    0    0

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
oliver_dp
Contributor
Contributor

Hi. I have the same Problem.

The latest hint was helpful to restore the vm and make it boot.

But I still don't see any of the shared folders I configured in /mnt/hgfs.

The guest extensions are installed, but there seems to be no auto-mount happening?
Is auto mounting the shared folders an expected feature?

If so, what can we do to make it work?
If not, what is the best way to mount these folders? 

0 Kudos
Technogeezer
Immortal
Immortal

Auto mount of vmware shared folders doesn’t happen automatically unless all 4 of the following are true:

  • open-vm-tools installed in the guest
  • The additional line in /etc/fstab in the guest is present
  • the host folders you want to share are listed in the VMs folder sharing settings
  • folder sharing is enabled for the VM in its settings

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos