5

I've been trying to share a folder between my guest, Cent OS, and host, Windows 10, using VMWare Workstation 14 Player. The easiest way, drag&dropping files from host to guest, does not work properly, as one or more files always ends up being of a smaller file size and thus corrupted, even though there is enough storage space in the virtual machine.

Then I have done the steps below to enable folder sharing from the host to the guest OS:

HOST WINDOWS 10

  • Shared the folder with everyone (to assure that there is no permit limitations with my files)

GUEST CENT OS

  • VM -> Settings -> Options -> Shared Folders. And added my folder.
  • As per the suggestion of several posts on here, I've run vmware-config-tools.pl multiple times, e.g.:

    sudo vmware-config-tools.pl -d --clobber-kernel-modules=vmhgfs

..but the /mnt/hgfs folder, where my shared folder was meant to appear, remains empty!

I have gone through the VMware manual, and I am sure that I have followed their requirements. I am still not sure the VMware tools are installed completely, since typing vmware-hgsclient in the guest OS terminal returns the error "command not found".

Any suggestions?

5

First of all you need to create a folder where the mount should be pointed to.

sudo mkdir /your_shared_folder

Then you should see your vmware shared folder using this command:

sudo vmware-hgfsclient

If you do see your shared folder then running this should mount your vmware shared folder to the folder you previously created:

sudo vmhgfs-fuse /your_shared_folder
  • I tried this in Parrot OS, worked as it is a Debian, sudo less. – Rifat Nov 12 '20 at 7:59
2

Prerequisites:

  • open-vm-tools version is at 10.0.0 or greater
  • OS supports fuse
  • Kernel version >= 3.10 (if open-vm-tools < 10.3.0. kernel version must be >= 4.0)
  • Supports systemd

Procedure:

  1. Remove any extra files from the /mnt/hgfs/ directory (if no other shared folders, the command rm -rf /mnt/hgfs/* works and worked for me)
  2. Create the file /etc/systemd/system/mnt-hgfs.mount with this content:
[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
  1. Add to or create the file /etc/modules-load.d/open-vm-tools.conf with this content:
fuse
  1. Enable the systemd service with the command: sudo systemctl enable mnt-hgfs.mount
    This will make sure the hgfs fdirectory will be mounted after a reboot.

  2. Make sure the 'fuse' module is loaded: sudo modprobe -v fuse

  3. In Workstation or Fusion, enable "Shared Folders" in "Virtual Machine Settings" > "Options", and set the folders to be shared.

  4. The shared folders should appear in the directory /mnt/hgfs. If that is not the case, start the service with: sudo systemctl start mnt-hgfs.mount or reboot.

The details/source information is here: https://kb.vmware.com/s/article/74650

  • I can confirm this solution worked like a charm. Stephen is a gentleman! – Nickon Sep 23 '20 at 12:13
  • @Nickon I am glad that my answer was able to help you! Is the Stephen that are you talking about in your comment Stephen Kitt? – Chad Sep 29 '20 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.