37

I'm running Ubuntu 14.10 in VMware Player on Windows 7. I have installed open-vm-tools instead of VMware Tools because VMware's software was unable to compile the kernel module required for file sharing. I cannot get my shared folder to mount with sudo mount -t vmhgfs .host:/$(vmware-hgfsclient) /mnt/hgfs or sudo vmware-hgfsmounter .host:/$(vmware-hgfsclient) /mnt/hgfs. Both return Error: cannot canonicalize mount point: No such file or directory. I have no idea what this is referring to or how to fix it.

Melab
  • 1,678
  • current (as of May 2016) open-vm-tools package is buggy; you'll need to compile it yourself from source: https://github.com/vmware/open-vm-tools/issues/62 –  May 22 '16 at 19:20

6 Answers6

65

My way of solving this issue is to resort to vmhgfs-fuse installed with open-vm-tools.

Either mount locally using vmhgfs-fuse .host:/$(vmware-hgfsclient) ~/some_mountpoint or globally using sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other. To then make mounting globally persistent add the following line to your /etc/fstab:

.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0

  • The only thing I would add to this solution is that you might consider other file system options, for example "allow_other,uid=1000,gid=1000,auto_unmount,defaults". I installed the guest OS by pointing VMware at the downloaded ISO image. I did not explicitly let VMware install tools for me, and initially updated the Ubuntu installation. At that point open-vm-tools was installed, I did not have to install the package manually, and vmware-config-tools.pl did not appear to be part of the installed package. – MFB Nov 28 '16 at 18:09
  • Confirmed this works for 16.04 as well. – Kenneth Apr 06 '17 at 07:34
  • 1
    Works on 17.04 too and definitely a better solution than hacking the open-vm-tools – fmo Jun 06 '17 at 15:42
  • 1
    Ubuntu 14.04 installed open-vm-tools , but there is no vmhgfs-fuse. – Mithril Jun 22 '17 at 13:57
  • With Kubuntu 16.04.3 I installed package open-vm-tools-desktop, created directory /mnt/hgf, rebooted system, added .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0 to /etc/fstab and then mount -a. – Cyrus Dec 20 '17 at 15:38
  • verified with Ubuntu 17.10 "artful" – Daniel Alder Feb 26 '18 at 10:37
  • Worked for me on Q4OS. – Felipe Jun 06 '20 at 07:00
  • On Ubuntu 20.04, I was able to do this solely by adding this line to /etc/fstab: .host:/ /mnt/hgfs fuse.vmhgfs-fuse auto,allow_other 0 0 – Keith Bennett Apr 18 '21 at 23:04
  • mounting locally your way is creating the directory in a weird way - I can list it as super user, but I cannot enter it (sudo cd) – Line Apr 14 '23 at 09:44
7

As the other answers didn't work for me, I finally got it working after long time of digging from this link : Files missing in /mnt/hgfs on Ubuntu VM? where PieCot gives the solution:

$ git clone https://github.com/rasa/vmware-tools-patches.git
$ cd vmware-tools-patches
$ ./patched-open-vm-tools.sh
Damien
  • 179
  • This answer works, although I'm not sure it's enabling shared with folders with open-vm-tools. It seems to be downloading tools directly from vmware and patching them. – Shawn Hoover Apr 14 '16 at 21:26
  • This was the only way I got it working (tried to build open-vm-tools from source but without a luck on Debian Jessie). One small notice make sure your user is in sudoers list otherwise you had to remove sudo call from scripts and run commands from patched-open-vm-tools.sh manually as I did – Geradlus_RU Nov 19 '16 at 23:09
  • Working here for Ubuntu Gnome 16.04 LTS. – FourtyTwo Jun 07 '17 at 06:44
  • It didn't work for me. :-( – Felipe Jun 06 '20 at 06:58
1

On the VM make sure:

That you have folder sharing enabled

That you have at least one folder shared between the host and guest

On the Ubuntu guest:

Check /mnt/hgfs to see if you can access the folder, if your unable to do so run this tools command:

sudo vmware-config-tools.pl

Update the fstab using:

gksu gedit /etc/fstab

Use a text editor to enter the following at the end of the file:

.host:/{shared-folder} /{path-to-mount-on} vmhgfs defaults,ttl=5,uid=1000,gid=1000   0 0

The final step is to restart your vm ( you may need to restart it , or get an error saying unable to mount, just skip this and restart a few times)!

Thanks, hope this helps!

Trevor Clarke
  • 892
  • 6
  • 18
  • I refered to this while answering your problem: http://askubuntu.com/questions/29284/how-do-i-mount-shared-folders-in-ubuntu-using-vmware-tools – Trevor Clarke Feb 01 '15 at 01:49
  • 2
    I'm not using VMware Tools, so "vmware-config-tools.pl" does not exist on my installation. I'm not using it because it gave me trouble before. – Melab Feb 01 '15 at 18:38
  • For this I'm using open-vm-tools. I couldn't get the instructions to work with VMware's software. Do you have anything else? – Melab Mar 22 '15 at 19:51
  • This may not work in newer versions of Ubuntu (later versions of 16.04 onwards). See: https://github.com/vmware/open-vm-tools/issues/248 – prusswan Sep 24 '18 at 09:49
  • You need to replace vmhgfs with vmhgfs on recent versions, see https://stackoverflow.com/questions/38737254/vmhgfs-fuse-at-boot-with-vmware-windows-8-1-host-and-ubuntu-16-04-guest – Étienne Aug 01 '19 at 11:07
1

Ubuntu 17.10 requires installing the vmhgfs driver through the proprietary VMWare Tools tar-based installation. For details see http://partnerweb.vmware.com/GOSIG/Ubuntu_17_10.html

drott
  • 111
0

This worket for me in Debian, I thing that will be the same on Ubuntu.

Install open-vm-tools-dkms package.

apt-get install open-vm-tools-dkms

Create a mount point.

mkdir /mnt/hgfs

Mount all chares in the mount point. With permission to all users

/usr/bin/vmware-vmblock-fuse /mnt/hgfs -o allow_other
toni
  • 1
-1

It simply means that your mount point does not exist.

$ ll /mnt
total 12
drwxr-xr-x  3 root root 4096 Feb 22 20:37 ./
drwxr-xr-x 22 root root 4096 Feb 22 20:16 ../
drwxr-xr-x  2 root root 4096 Jan  3 04:56 cdrom/

$ sudo mount -t vmhgfs .host:/Share /mnt/hgfs/Share
Error: cannot canonicalize mount point: No such file or directory

$ sudo mkdir -p /mnt/hgfs/Share

$ ll /mnt/hgfs
total 12
drwxr-xr-x 3 root root 4096 Feb 22 20:52 ./
drwxr-xr-x 4 root root 4096 Feb 22 20:52 ../
drwxr-xr-x 2 root root 4096 Feb 22 20:52 Share/

$ sudo mount -t vmhgfs .host:/Share /mnt/hgfs/Share
knh
  • 1