Using shared folders between VMware Workstation and Linux guest OS

This is a note that it is now perfectly possible to share folder and files between a VMware workstation host (or VMware Player) and a Linux guest OS without installing the proprietary VMware tools for Linux

It’s just surprising to me that no-one appears to have documented this properly

VMware is no longer developing VMware tools any more for Linux distros, but is instead putting VMware tools functionality into an open source package available for most Linux flavours out there called open-vm-tools

Assuming you have installed a Linux guest OS under VMware workstation, then this is the procedure you will need to follow

First, create or identify a directory on your host Windows system that you want to share with the Linux OS.

  • For the sake of example, let’s assume you want to share the folder C:\sharedfiles

Once done, open a console to your Linux guest and install open-vm-tools from the repository of your chose Linux distribution. This will probably entail connecting to the Internet to get it, but it needs to be done.

  • For CentOS for example, this means the following command:

sudo yum install –y open-vm-tools

  • For Ubuntu it is

sudo apt-get install open-vm-tools

Once the package has been installed then you need to shutdown the Linux guest OS gracefully via

sudo shutdown –h now

When the OS has been shutdown, then go to Settings for the Linux guest and click on the Options tab and select Shared Folders

If the Folder Sharing is disabled then select “Always Enabled”

Add the Folder to be shared but giving it a name (eg “SharedFiles”) and attach it to a directory on your host Windows OS (eg “C:\sharedfiles”)

Click Next, make the attribute “Enable this share” has been checked and make sure the attribute for “Read-Only” is de-selected (unless you want the host directory to be read-only, in which case check it)

Click Finish, OK when you’re done and then start the Linux guest OS again.

Once the Linux OS has booted, go to the console and type the following command:

sudo vmware-hgfsclient

which should return the shared folder (eg “SharedFiles”)

To  connect the two file systems you will need to create or nominate an empty directory accessible by your Linux user

From the user home directory create a directory called “shared”, eg

mkdir ~/shared

Then mount the shared folder

sudo vmhgfs-fuse –o allow_other .host:/SharedFiles ~/shared

If you then change to the share directory then you should be able to see files in that directory which are on the host Windows OS.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s