Why can't I access a shared folder from within my Virtualbox machine?

I have Ubuntu 14.04 as my host system, and then on Virtualbox, I have Lubuntu 14.04.

I am trying to share a folder on my host system so that my guest system can write files to it. I've followed instructions as best I can, installed the Virtualbox guest additions. I've got to the point where I've added the shared folder in the Devices interface:

shared folder

However, even after rebooting, I can't find the folder anywhere in my guest system.

How do I get my shared folder to actually show up in my guest Lubuntu machine?


You have to mount your folder on your VM.

First you need to install Guest Additions (although I already did this during the installation).

  1. Start your VM
  2. Devices > Insert Guest Additions CD image...
  3. I had to manually mount the CD: sudo mount /dev/cdrom /media/cdrom
  4. Install the necessary packages: sudo apt-get install make gcc linux-headers-$(uname -r)
  5. Install the Guest Additions: sudo /media/cdrom/VBoxLinuxAdditions.run

Now you can mount your share using:

mkdir ~/new
sudo mount -t vboxsf New ~/new

Where New is the name of your shared folder.

Now you can access the shared folder at ~/new.


Note: this is not permanent. To permanently mount your folder you should add the following line to /etc/fstab (sudo nano /etc/fstab):

New /home/user/new vboxsf defaults 0 0

Obviously you should replace user in /home/user/new by your own username.


How to access Windows Host shared directory from Ubuntu VirtualBox Guest:

  1. Create a directory in Windows on any location of your choice.
  2. In the VirtualBox go to the settings of the Ubuntu Guest.
  3. Under the Shared Folder section add the location of you folder created with full permission.
  4. Now start the ubuntu guest, and make sure that you have the latest VirtualBox Guest Additions installed
  5. Now add your user to the vboxsf group:

    sudo usermod -aG vboxsf $(whoami)
    
  6. Logout the user and login again.

  7. Now you can access your shared directory in /media/sf_(shared_folder_name).

How to share folders in virtual box (Step by Step Guide)

  1. Go to Virtual Box/Device/Shared Folder (on host OS)
  2. Add a folder that you want to share in the pop-up. (on host OS)
  3. Let’s name this folder “Shared” (on host OS)
  4. Now Go to Device and install guest addition.
  5. Now next step would be to create a folder that you want to sync with host OS, but make sure that you are at /home/UserName.

    You can check it by typing pwd in the terminal. Now creating directory -

    mkdir Share
    sudo chmod 777 /home/userName/Share
    
  6. Now install guest additional package (Crucial step! People generally miss this which creates an error “Unknown file type “vboxsf”)

    sudo apt-get install virtualbox-ose-guest-utils
    
  7. Now do the final step by mounting the folder (on guest OS)

    sudo mount -t vboxsf share ~/Share/
    
  8. Done! now sync files between Host and Guest OS through virtual box.


  1. Highlight the VM, go to Settings > Shared Folders and add folder.
  2. Start VM Go to Devices > Insert Guest Additions CD image.
  3. Allow VM to run Guest Additions installations.
  4. In terminal run: sudo adduser (your user name here) vboxsf
  5. Restart VM.