I used to use gmail to share files between host and guest in VirtualBox. But sometimes we wants to move big files between VirtualBox host and guest, and email cannot handle it.
Actually VirtualBox has a built-in mechanism to allow us share files easily. Below is the step-by-step (actually only 2 steps) method. Note that this method should also apply to other host and guest combinations with modifications, but I did it on Windows 7 Host and Ubuntu 10.0.4 Guest.
1. Create Shared Folder at VirtualBox
This needs to be done when the guest OS is powered off. Select the guest image, go to Machine menu and select settings submenu, as shown in figure 1 below,
Figure 1. Select Settings from VirtualBox Menu
A window will pop up, select Shared Folders. Then click the +folder icon at the right side. Browse to a folder and give the shared folder a name. This is shown as below,
Figure 2. Create Shared Folder
2. Mount Shared Folder to Guest OS
Power up the guest OS, Ubuntu 10.0.4 in our case. Then start the command prompt. Suppose the shared folder we created at step one is named “shared”, enter the command below,
sudo mkdir /mnt/win7
sudo mount -t vboxsf shared /mnt/win7/
This will give you access to the shared folder at /mnt/win7/.