Share folders in Virtual Box running Ubuntu-guest on Windows-host
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ytxfD1XHWQ5UPbs05w6v2bXLLEWA-Mf4kMsxIBWiZ1S6nK2dREo8e6Vtx5zT59OvQ-8eBIKp2YUN2Ixip3UzxrzKnLh8-CQqiDgiS0smQB-Yk9EsIiSrySDS6R8FhQ3iB4DPTZ9dgO0/s200/vbox_eps_cmyk2_ico.png)
In Sun xVM Virtual Box, VirtualBox allows user to select and declare folders and directories on host machine as “shared folders”. After setting the shared folders, user can then access these shared folders from within the guest operating system of the virtual machines. In Windows XP
and Vista guest, user can see the VirtualBox Shared Folders from within its entire network neighborhood.
Although Virtual Box provided an option of shared folder, it is not straightforward to use this shared folder. It took me some searches on VirtualBox forum to find it how Ubuntu guest OS can access the shared Folder on WinXP host OS.
STEPS :
Start the Virtual Machine on which you want to work. First you have to make sure that have install Guest Additions. From the VirtualBox's menu go to Devices → Install Guest Additions... This will mount a virtual CD on your /media/cdrom. Normally this folder's window will show up. As root run the program VBoxLinuxAdditions.run. When the program completes reboot your VirtualBox.
# sudo mkdir /media/windows-share
Of course you may choose an alternative path for your mountpoint. With your mountpoint created you can now mount the shared folder, like this:
# sudo mount -t vboxsf folder-name /media/windows-share
Where folder-name will be the name you assigned for this folder when you were adding it in the shared folders list.
You could use the /etc/init.d/rc.local script to execute these commands on startup to have the shared folders automatically mounted every time you start your Ubuntu VirtualBox.