Enable auto mounting of shared folder(s) at boot within a VM

Registered by Nate Muench (Mink) on 2011-06-28

There is a major feature missing from the open source version of VMware Tools (open-vm-tools), a feature that is included in the standard VMware Tools (which comes with the software (Workstation, Player, Fusion, etc)). This feature I’m talking about is the automatic mounting of shared folders.

The module needed to mount shared folders is already included in the open-vm-tools package, said module is vmhgfs.

Right now, in order to access your shared folder(s), within the virtual machine, is to manually issue the mount command (and create the hgfs directory within the /mnt folder, if not created already). This can be tedious to an average user, who previously used the standard Tools, and starts using the open source version. This user has folders shared with the virtual machine, but they can no longer access them (like they use to) because they aren’t automatically mounted at boot.

To the summary, I would like the open-vm-tools package to automatically mount shared folder(s), if they exist, during boot.

My current progress with this issue will be indicated on the whiteboard. There is no goal or milestone when I would like this to be implemented (at least not yet). This blueprint is to indicate that there is a solution to a problem, but I need some help to make it better.

Blueprint information

Nate Muench (Mink)
Needs approval
Series goal:
Milestone target:
Started by
Nate Muench (Mink) on 2011-06-28

Related branches



What I've done
I currently have the preliminary work done already. In the open-vm-tools.init file in the debian folder, I currently have the following:
if [ ! -d /mnt/hgfs ];
        mkdir /mnt/hgfs
mount -t vmhgfs .host:/ /mnt/hgfs

This command checks for the existence of the hgfs directory within /mnt and, if needed, creates it. After this check it issues the mount command. And when Ubuntu shuts down the hgfs directory is unmounted

It gets the job done (auto mounting the folder at boot), but it can be done better.

The packaging with this code exists in my Programs PPA (https://launchpad.net/~n-muench/+archive/programs-ppa). I use it because I have one Virtual Machine that uses a shared folder, and I'd rather have it mounted automatically, instead of manually.

Also, when there are no shared folders, Ubuntu gives me a input/output warning.

Work Items
-Make my 5 lines of code better (the "mount -t vmhgfs .host:/ /mnt/hgfs" stays, as it works already)
 * Get rid of the input/output error.


Work Items

This blueprint contains Public information 
Everyone can see this information.


No subscribers.