Before starting ensure that you have updated VirtualBox to the latest version.

Adding Virtual Box Shared Folders is easy but can be frustrating if you have not done it before. The guide assumes that you are trying to add shared folders on a Linux virtual machine.

First Step – Install Guest Additions

The first step is installing guest additions. Start up your virtual box machine and then select devices -> install guest additions from the VirtualBox menu.

Installing Guest Additions
Installing Guest Additions

If this does not automatically start the install, browse to the CD and run the autorun.sh file. On Ubuntu this is automatically detected. Accept the confirmation to begin.

Run guest additions install
Run guest additions install

Enter your password when prompted and wait for the installation to finish. The installation progress can be seen in a terminal window. It will take about 5 minutes to complete. Once this has completed, open up the settings window in VirtualBox (Machine -> Settings).

In this menu press the shared folders tab and then the add button. When the add dialog appears select the drop down box and other to browse to a folder to use as a shared folder on the host.

Add shared folder
Add shared folder

Select Auto-mount and Make permanent so that the folder will be available every time you use the virtual machine. Select OK to confirm and close the settings window.

Finally you need to add your user to the shared folder group to have permissions to view the folder on your Linux guest virtual box. This can be done with one of the following:

  • Debian (Ubuntu etc.)

adduser <<username>> vboxsf

  • Redhat (CentOS etc.)

usermod -a -G vboxsf <<username>>

(You can find your username by opening a terminal it will be <<username>>@….)

Now restart the virtual machine.

You can now browse to the shared folder. This should be:
/media/sf_<<sharedfoldername>>

You can check it is working by creating a file in either host/guest and check that it can be accessed on both.

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *