TurnKey Linux Virtual Appliance Library

vmware workstation vmhgfs mount / Shared Folders with host

Does anyone have step by step instructions for setting up Shared Folders on vmware using Turnkey Linux LAMP? or TKL Core?

Here is what I tried, but without any luck:

1. In VMware went to Virtual Machine Settings -> Options -> Shared Folders
Checked off "Always enabled"
Created a share named hostshare pointing to C:\hostshare

2. Restarted the VM in VMware workstation

3. ran hgfsclient, and I see the name of the shared folder I just created

 

# /usr/bin/vmware-hgfsclient

hostshare
 
4. Mounting -- no luck:
	# mount -t vmhgfs .host:/hostshare /mnt/hostshare

Error: cannot mount filesystem: No such device
Any suggestions?  Can anyone provide step by step instructions?
 

Took the CIFS direction

I ended up taking another route for sharing host folders on my TKL VM.  I document the process at the link below... but still feel a bit dissatisfied that the desired path did not work.

Step by step instructions for using CIFS on TKL VM to share folders on vmware (would probably work on virtualbox too)

http://techdad.wordpress.com/2011/06/25/vmware-and-turnkeylinux-mount-shared-folders-from-windows7-host-to-ubuntu-guest/

VMWare Tools Steps

1.  Fully apt-get update, upgrade and dist-upgrade your guest

2.  Reboot if required.

3.  Check that there are no more updates remaining to be installed.

4.  Follow the steps listed in the link below for VMWare Tools for Debian.  I've found that this never fails to work for me:

http://www.wingfoss.com/content/how-to-install-vmware-tools-on-debian-ub...

Jeremy's picture

Sorry didn't post sooner.

I actually thought I posted here this morning. I was in a bit of a rush though so perhaps just 'previewed'.

I don't even recall exactly what I was going to post, but it was something along the lines of checking that the hgfs module was loaded into the kernel (use lsmod command with grep to filter/limit the results). And also suggest that you tried just mounting ./host/ which should theoretically mount all shared folders from the host to the specified directory.

And I was going to mention worst case scenario, try Samba! But looks like you beat me to it. Thanks too for posting the how-to. For interest sake, TKL have a Webmin Samba module in their repo too, so for TKL appliances you can also apt-get install webmin-samba which allows for really easy configuration of shares.

Out of interest, the VMware tools should be preinstalled when using the VM (zip) images supplied by TKL. I would expect the VMware shared folders feature to work OOTB and if it doesn't it'd be good to try and work out why. Also Ubuntu have an open source version of VMware tools in their repo so even for ISO installed images you should be able to apt-get install open-vm-tools (or something similar - do an apt-cache search to check the exact name).

I tried what you did in your first failed attempt, and...

it worked. It gave me the same error you had, but then I realized that I capitalized the first 'H' when I made the folder "C:\Hostshare". After that, I capitalized the same letter in the mount command and the folder was mounted to /mnt/hostshare. So, I'm not sure if you put caps on any of the letters, but if you did, then put the same caps in linux. For some reason, in Bash's cli, it is specific about the capitalization of files and folders. So, in linux, "Hostshare" and "hostshare" are different folders, because of capitalization.

Jeremy's picture

Yes Linux is case sensative

As you've worked out. Although AFAIK it's actually the filesystem itself not something that is inherently Linux. So in theory if using a Win FS such as NTFS it's not case sensative - although I can't 100% confirm that.

Actually I just tested it on my Netbook (runs Bodhi Linux - based on Ubuntu) and for files stored on the FAT SD card I have test.txt is the same as TEST.txt (it actually won't even let me change the case of the filename, complains 'file already exists').

Name for host not valid

Error: # mount -t vmhgfs .host:/hostshare /mnt/hostshare

# mount -t vmhgfs .host:/ /mnt/hostshare

You have to install the vmware tools first

Hi,

I wrote a guide to mount the shared folder in your guest linux OS, you can read the detail here: http://www.webtrunghieu.info/site/computer/sharing-files-and-folders-with-linux-guest-os-in-vmware-player . In general, you have to install and config the VMWare Tools first.

Jeremy's picture

If you are using TKL VM image then it should be installed

I haven't used any VMware products for some time, but TKL VM images have the VMware tools preinstalled (or at least they used to).

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)