How to Share Files between Windows 7 Host and Ubuntu Guest in VirtualBox

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 stepsSmile) 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,

1

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,

3

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/.

Best Combination of Linux and Windows — The Seamless Mode of VM VirtualBox

Programmers and computer geeks alike love Linux. It’s open-source, free, cutomizable …. Well, we also have to face the truth that Windows still dominate the desktop computing world. Many software and its service are only available to Windows.

So here comes the Virtual machine, which allows us to run Linux on Windows, or Windows on Linux. It used to be slow, but the speed is getting better.

Sometimes it can be difficult to view the stuff on your screen when you have two operating system running (one in VM).

VirtualBox actually has a Seamless Mode, as shown below,

image

Once I entered the Seamless mode, my screen becomes like this,

image

On the right, I have access to the Windows toolbars; On the top, I have Linux menus. The background is actually as it is in Windows. It’s just like Windows and Linux are combined together. Isn’t this great?

Side note: First draft on Apr 16 2011