Subscribe to How-To Geek

How to Share folders with your Ubuntu Virtual Machine (guest)

VMware Workstation provides a great ability to create shared folders so that your virtual machine can easily access data on your host pc. This saves a lot of time, especially when you are installing software that would otherwise take a long time to download.

For this to work, you will need to make sure that you have the vmware tools installed and running.

You can check to see if the vmware shared folders module is running by running this command:

lsmod | grep vmhgfs

If you get nothing then the mdoule is not loaded. You will need to load it with this command:

modprobe vmhgfs

If that gives you another error, then you don’t have the vmware tools installed, and you will want to make sure to install them before proceeding.

In VMware Workstation, go to the VM \ Settings window and then click on the Options tab. From here you can modify the shared folders.

Click the Add button, and you will be presented with a wizard. Click next, and you should see this screen:

The name field will become part of the mounted path in Ubuntu, so name it something short and to the point. For instance, this shared folder will be mounted on /mnt/hgfs/mydrive/

Select the host folder that you want to share and then click the Next button

If you are worried about the guest operating system messing with your files, you can select the read-only checkbox. I personally did so simply because I was worried about accessing in-use files.

You shouldn’t even have to restart your virtual machine. The folders should immediately show up under /mnt/hgfs

That’s all there is to it. Remember, if you have problems it’s probably because your vmware tools are not installed.

Tested on: Ubuntu Dapper, Ubuntu Edgy Eft

Update: If you have problems you might also want to check your firewall settings, which could be disabling communications between the virtual machine and your host computer. Thanks to burkhard in the comments for noticing this.

| More
This article was originally written on 10/26/06 Tagged with: Ubuntu, Ubuntu Tips & Tweaks, VMware

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (13)

  1. Burkhard

    Hi,
    I installed VMserver running on Kubuntu Edgy Eft and had the problem that vmserver didn’t activate the shared folders (I couldn’t even activate a share).
    So I set up Samba and share a folder on an FAT32-partition.
    I couldn’t connect from WinXP to that share, neither configuration worked.

    Reason: I use ZoneAlarm under XP and forgot to set a secure zone for all IPs of the local network.
    This took me some hours to find out.

    Just a hint, if anybody else runs into that issue

    greetings from Germany

    Burkhard

  2. The Geek

    Burkhard,

    Thanks for the note, I’ve added a line to the article as well.

  3. jpl

    I’m running Kubuntu Edgy Eft on VM Workstation 5.5.3 .
    I installed the VM Tools for 5.5.3.
    I was able to configure and use a shared folder but now it does not work anymore. I tried several things: restarting the VM, disabling/reenabling the shared folder, …
    One thing is that I apparently do not have the “vmhgfs” kernel module. Is it required with 5.5.3 ? How did it work on the first place then ?
    Do you have any hint to solve this ?

  4. Chuck Gregory

    I have a 64-bit version of Feisty running in a VMware virtual machine under Vista Home Premium 32-bit. It seems to be working very well and it runs much faster than the 32-bit version of Feisty that I have set up as a shared boot (i.e., one that runs standalone rather than under Vista).

    The thing is…

    VMware tells me that my installation doesn’t support VMware tools. I’ve managed to do some sharing anyway, but it’s a real pain to set it up. Do you know if there’s a way around this, perhaps some sort of install directly on on the virtual Ubuntu system?

    Chuck

  5. Planet Malaysia

    This is cool! I was looking for this! Anyway, you still can use samba, FTP, and etc.

  6. Ying

    To jpl:

    I might an answer for you. Check out this webpage: http://ubuntuforums.org/showthread.php?p=4091869

  7. Ying

    For the line “-vi compat_slab.h”, I used “-gedit compat_slab.h” instead because gedit works better in my Ubuntu 7.0.10.

    Good luck!

  8. jose

    Tested on
    Host : Win XP
    Guest Ubuntu 8.10 Ibex
    VMWare Tools 7.8.4-126130
    VMWare Workstation 6.5.1-126130

    It works.

  9. Kåre Jonsson

    I installed Ubuntu 8.10 in VMWare 6.0.3 and had no problems for a while. When trying to share folders my luck changed. It revealed that vmtools did not compile the vmhgfs but continued with installation and succeeded with most or all other things. This page helped me to determin this. Thansk very much for this page.

    By upgrading VMWare to 6.5.2 and reinstalling Ubuntu 8.10 cleanly I got a flawless installation with filesharing immediately functioning.

  10. Steven Tuxfield

    Thanks a lot for this wonderful blog. Now I can share files between Win XP and my Linux virtual machine.

    Steven

  11. admin

    Here is additional info on how you can achieve full read/write permission
    http://airkayu.com/content/ubu.....ocal-users

  12. Ricardo

    Very good article!! Thanks!

  13. buddz

    hi im baciacally doin wat uve said but da other way round, im usin linux as my host n ubuntu for vmware. i have made a shared folder as instructed but i cant seem to find if on windows, can anyone help…..

    thanks


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.