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

Registered by Nate Muench (Mink)

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

Status:
Started
Approver:
None
Priority:
Undefined
Drafter:
Nate Muench (Mink)
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
Nate Muench (Mink)

Related branches

Sprints

Whiteboard

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 ];
then
        mkdir /mnt/hgfs
fi
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.

Subscribers

No subscribers.