4

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 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. My steps are:

  • In context "VMware Workstation > VM > Settings > Options > Shared Folders", configure the intended folder as "Always enabled".
  • Power on the guest virtual machine.
  • On the guest VM, look for the shared folder in directory /mnt/hgfs/my-shared-folder/, but it didn't work as described in the post.

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# 
2
  • 1
    What are the settings?
    – Z0OM
    Commented Jul 15, 2022 at 8:52
  • Thank you for your reply, @BlockchainOffice, and I have edited the post with more details about the test settings.
    – James
    Commented Jul 15, 2022 at 15:52

3 Answers 3

5

It looks like system service mnt-hgfs.mount is not yet running on your machine. That service has to be running --- your shared folders have to appear in /mnt/hgfs --- before you try to mount your shared folders anywhere else. Follow these steps (as detailed in https://kb.vmware.com/s/article/74650 ):

  • Populate /etc/systemd/system/mnt-hgfs.mount with
[Unit]
Description=VMware mount for hgfs
DefaultDependencies=no
Before=umount.target
ConditionVirtualization=vmware
After=sys-fs-fuse-connections.mount

[Mount]
What=vmhgfs-fuse
Where=/mnt/hgfs
Type=fuse
Options=default_permissions,allow_other

[Install]
WantedBy=multi-user.target
  • Whether or not /etc/modules-load.d/open-vm-tools.conf exists, add this line to it:
fuse
  • Enable system service mnt-hgfs.mount with
sudo systemctl enable mnt-hgfs.mount # so that mount happens after reboot  
  • If not already done, in VMware tab for your machine > Settings > Settings > Options > Shared Folders > (fill in information for Host Path and Name)
  • Start the service
sudo systemctl start mnt-hgfs.mount

Then after your intended shared folders appear in /mnt/hgfs/ you can try to autoboot-mount them elsewhere via /etc/fstab, or apply to them vmhgfs-fuse.

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Toto
    Commented Sep 9, 2022 at 10:07
  • @Toto - done; essentially the same. (The link is very much pared down to essentials, to begin.)
    – Danny Quah
    Commented Sep 9, 2022 at 12:05
3

Came across this solution on VMware website:

  • 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,_netdev 0 0
  • Then reboot your VM. The shared folders should now appear at the mount point /mnt/hgfs
2
0

VMware Shared Folders work with Windows guests. I have not made them work out of the box on Linux guests.

Try this article to see if it helps.

VMware Shared Folders

I have VMware V16 Pro on Windows 11 with an Ubuntu 22.04 guest.

There are two ways forward I use (both methods).

(1) SMB from Ubuntu to Windows. This is easiest because Windows has SMB by default.

In Linux: smb://192.168.x.y/folder/ and authenticate.

(2) Install Samba in Ubuntu. I did this as well. Configure it and then map an Ubuntu drive in Windows with File Explorer. Samba works as well.

Here is a tutorial for installing Samba

Install Samba

1. Installing Samba

In the Linux machine, install Samba

sudo apt update
sudo apt install samba

Use  whereis samba to verify the install.


2. Setting up Samba


Make a directory to share:  mkdir /home/<username>/sambashare

Edit the smb.conf file:  sudo nano /etc/samba/smb.conf

Add the following lines at the bottom of the file:
    
    [sambashare}
    comment = Samba on Ubuntu
path = /home/<username>/sambashare
read only = no
    browsable = yes

    Ctrl-O to save and Ctrl-X to exit the editor
    
    Restart the samba service:   sudo service smd restart
    
    Update the firewall rules if necessary:  sudo ufw allow samba

    
Setting up User Accounts and Connecting to Share

sudo smbpasswd -a <username>   and password

(username must belong to a system account or it will not work)

In Linux:

smb://ip_address_of_Linux/sambashare

In Windows:

\\192.168.x.y where this is the IP of the Linux Machine

Authenticate with <username> and password

Shows as sambashare in Windows Explorer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .