SDB:VMware Tools

Jump to: navigation, search
VMware Tools is a collection of enhancements which are installed in Guest VMs to provide extended functionality. As of kernel 4.x, most of these enhancements have been integrated upstream in the mainline kernel, but Shared Folders is not. But, even Shared Folders has undergone changes, now implemented differently as a FUSE file system instead of previously as a file system accessed using the Plan 9 protocol.

Shared Folders can be useful to provide common access by one or more Guest VMs and the Host to one or more folders on the same machine without relying on networking functionality.

This SDB describes how to set up and configure Shared Folders for VMware running on any HostOS and any openSUSE as a GuestOS when using any VMware product.



Shared Folders

Which kernel is installed in my openSUSE?

Unless you have installed an unusual kernel, openSUSE 13.2 and 13.1 (and earlier) will be running on a 3.x or earlier kernel. Anything later including Leap 42.1/42.2 and Tumbleweed will be running on a 4.x or later kernel.

If you wish to determine your kernel, run the following in a console

uname -r

For kernels 4.x and later

Shared folders are now implemented as FUSE file systems and no longer require building Kernel Loadable Modules.

1. Shutdown your Guest

2. Modify your Guest's Properties,
Options > Shared Folders > Enable and configure

3. Start your Guest.

4. From within your Guest, you can list your available Shared Folders (configured in Step 2) by running the following command

vmware-hgfsclient

5. You can now mount the Shared Folder like any other FUSE system, although some tools have been named for vmware folder mounting, these tools' functionality are identical to generic FUSE tools.

Important concept - Specify Folder Name or Not

If you specify the Shared Folder by name (as listed when you ran step 4), you will mount the FUSE file system (shared folder) in the specified mount location.

But, if you <don't> specify the Shared Folder by name (only describing the host:) a temporary subdirectory will be automatically created with the Shared Folder name for any and all Shared Folders.

Examples:

The following will mount a Shared Directory called "VirShared" in /mnt . This might be considered a bit restrictive because it means any other mounts should not be mounted in /mnt likely causing confusion over overlapping directory trees

vmhgfs-fuse .host:/VirShared /mnt/

The following will mount a Shared Directory called "VirShared" not in /mnt directly, but instead will create a subdirectory in /mnt with the same name as the Shared Folder with the contents of the Shared Directory. Note also that when you do not specify a Shared Folder name, all available Shared Folders are mounted using the specified location as the root mount point.

vmhgfs-fuse .host: /mnt/

I encourage the first time User to try both the above configurations to understand how each works. To unmount the Shared Folder, see below

Unmounting a Shared Folder

There is no vmware specific tool, so use the generic FUSE tool to unmount

fusermount -u /mnt/

NOTE:
A FUSE file system may not unmount because it's "busy." Unfortunately there may not be a definitive way to track exactly what process may be preventing the unmount. A good try is to use the standard force umount command as follows, then wait (It may take time for the command to take effect)

umount -f /mnt/

Enabling non-root access to Shared Folders

All mounted FUSE file systems default to root-only access. For more information, the FUSE project homepage discusses the security implications
https://github.com/libfuse/libfuse

Still, virtualization deployments generally enable non-root access to Shared Folders by default.
To enable non-root access, the "allow_other" option is set as follows when mounting

vmhgfs-fuse -o allow_other .host: /mnt/

A common scenario is that a location like /mnt/ may already have a mounted device, in this example /mnt/cdrom. Multiple parameters can be passed separated by a comma and no spaces, so for this example the following will mount all shared folders while removing the mounted cdrom from view

vmhgfs-fuse -o nonempty,allow_other .host: /mnt/

For kernels 3.x (and possibly anyone running 2.x)

Shared Folders are supported by Kernel Loadable Modules which are compiled on demand when installing VMware Guest Tools. As of this writing, VMware has stopped releasing Guest Tools as part of its commercial VMware products, but supports community-based Tools. Because installing prerequisites and installing the Tools themselves can be difficult and complex, the User should instead install using the rasa vmware-tools project at

https://github.com/rasa/vmware-tools-patches

Once cloned(using git) or downloaded and extracted following the instructions on the project home page, run the master script which automatically updates your system, installs dependencies and installs the Tools.

patched-open-vm-tools.sh

Hardware Pass-through

VMware Tools supports easy Hardware Pass-through without special device add and configure in the Guest Settings. Simply hover your mouse cursor over the various icons along the right of the Status Bar along the bottom of your graphical console. You should see a number of devices listed including your virtual disk and your Host's GPU. You may also see other devices attached to your Host including external devices (USB, SATA, etc). You can select any and click "Connect..." but beware that any kind of hardware pass-through means total monopoly of that device, removing it from even the HostOS. So, for example connecting to the only network device could cause a real problem to the Host and any other Guests, and connecting to the Display would have a very major effect on the Host and all other Guests.

More Reading:

As described in the beginning, Shared Folders are now implemented as an ordinary FUSE file system, so all generic FUSE documentatation and if necessary FUSE tools can be used to modify how Shared Folders are deployed.

For Further Assistance

Questiona and clarifications can be posted to the standard support options, the SUSE/openSUSE IRC channel and the Technical Help Forums (The Virtualization Forums are highly recommended over others)

For all support options
https://en.opensuse.org/Portal:Support


See also

Related articles