Monday, October 12, 2009

Virtual Box - Shared Folders

The VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system.

After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows and more.

In particular, Guest Additions provide for “shared folders”, which let you access files from the host system from within a guest machine.

This is how shared folders can be setup on a windows (xp) or linux (ubuntu) guest operating system :

1. Open up the virtual box interface by clicking on the virtual box shortcut or from the start menu.
2. In the left pane which contains the list of installed guest operating systems, select the system with which you want to share folders from the host operating system.
3. In the right pane, click on shared folders and select the folder you want to share. After this the number of shared folders which appears just beneath the shared folders option will increment by 1.
4. Now boot the virtual system.

For windows:

5. Open My computer and right click on network places in the right pane and select map network drive.
6. Choose a drive letter and to select the folder click on the browse... button. In the browse dialog box, expand the VirtualBox Shared Folders option and you'll find the folder you had shared there. Select it and click Ok.
7.In the Map Network Drive dialog box, check the Reconnect at logon checkbox if not already so and click on finish.
8. Now your shared folder will appear in the Network drives everytime you boot your virtual system. You can access the virtual drives just like normal drives from My Computer.

For linux:


5. To make folders mount everytime an ubuntu guest system is booted , you will have to edit the file with the filesystem static information, /etc/fstab.
6. To edit it open up a terminal and give the following commands :

cp /etc/fstab ~/fstab.backup
sudo nano /etc/fstab

6.Append at the end of the file

{name of shared folder} {path of the mount point}
(which will be something like /home/{user}/Desktop/downloads) vboxsf rw 0 2

7.To save press CTRL+O, then press CTRL+X to exit.
8.Restart the guest system and the shared folders will be mounted at the respective mount points.

1 comment: