Setting up Shared Folder in Virtualbox

Standard

While developing embedded applications in Ångström I find myself needing both the Windows and Linux environment.  To simplify the “go-between”, I decided to deploy Ubuntu under VirtualBox, and leverage the Share Folder feature of VirtualBox to pass files between the two environments.

There are many tutorials and on the web on how to setup Shared Folder under VirtualBox, but many describe a complex and out-dated setup process.  I later found that the more recent versions of VirtualBox made Share Folder setup much simpler.  The purpose of this article is help readers “cut to the chase” by using the simpler setup process.  (Note: this article assumes that the Guest Additions compatible with your version of VirtualBox has already been installed. If not, the steps to install the Guest Additions can be found here).

Now let’s begin.

First, start up VirtualBox and click on Settings in the VirtualBox Manager window as shown below.

VirtualBoxDialog

Figure 1:  VirtualBox Manager Window.

The above action will bring up a second dialog box like the one in Figure 2.  Select the Shared Folders option, then click on the green folder icon with a ‘+’ sign to add a new folder.

VB_ShareFolder

Figure 2: Shared Folders option.

The above action will bring up yet another dialog box like the one in Figure 3.  The Folder Path field selects the folder on the Host to share, while the Folder Name field defines the folder name on the Guest OS associated with the Host’s share folder.  The Auto-mount check box should be selected already; if not, select it.  If you intend on the Guest having read-only access to the shared folder, check the Read-only box.

VB_ShareSelect

Figure 3: Dialog box for entering Folder Path and Folder Name.

The Figure 3 example shows a folder named VirtualBoxShare by default, but it can be changed to something else.  Once the Guest OS has fully booted, the named folder can be found under /media/sf_<folder name>. So, if VirtualBoxShare is the folder name, you should find the file /media/sf_VirtualBoxShare on the Guest OS.

vb

Figure 4: VirtualBox with shared folder sf_VirtualBoxShare mounted.

Useful Links:

(The above article is solely the expressed opinion of the author and does not necessarily reflect the position of his current and past employers)