VirtualBox is a free and most popular virtualization software from Oracle. Oracle VM VirtualBox is installed on an existing host operating system as an application; this host application allows additional guest operating systems, each known as a Guest OS, to be loaded and run, each with its own virtual environment. Supported host operating systems include Linux, Mac OS X, Windows XP, Windows Vista, Windows 7, Windows 8, Solaris, and OpenSolaris; there is also a port to FreeBSD. Supported guest operating systems include versions and derivations of Windows, Linux, BSD, OS/2, Solaris and others Since release 3.2.0, VirtualBox also allows limited virtualization of Mac OS X guests on Apple hardware, though OSX86 can also be installed using VirtualBox
If you are using VMware, another virtualization software, you can copy files and folders directly from the host to Guest OS. But it is not so simple in VirtualBox.
In VirtualBox, you have to install guest additions in guest OS.
You can do this by Going to Devices –> Install Guest Additions in guest OS.
After installing VirtualBox Guest Additions, Reboot the Guest OS. Now your Guest OS is Ready to share the folders. Go to Devices –> Shared Folders and select the folders you want to share with Guest from Host OS.
Browse the folders you want to share by clicking ‘Add new shared folders’.
And give a ‘share name‘ in the ‘Folder Name’ box and remember that name. And you can make those files read-only and permanently shared, by checking corresponding check boxes.
These Steps are common for both Windows and Linux Guest OS.
Sharing in Windows Guest OS
In windows Guest you can access the shared folder instantly Using ‘Run’ program or you can mount permanently as Network Drives
Use windows key + R or select run from start menu. And Type “\\vboxsvr\sharename” Replace ‘sharename’ by the name you given as ‘Folder Name’ in the previous Step.
Mount as a Network Drive
Open command prompt from Start menu or type ‘cmd’ in Run.
And Type the followin Command ‘net use x: \\vboxsvr\sharename‘ (Replace ‘sharename’ with your actual shared folder’s name.). If you already use the drive-letter X:, give an unused letter.
Then Go to explorer or My Computer ,there you can see a new network drive (X:) mounted and ready for access.
In Linux (Back Track 5,Ubuntu…etc)
1. Create a folder on Desktop or anywhere else you want mount the shared folder from the Host OS (eg: Create a folder SharedItems on Desktop of the Guest OS ).
2. Then,Open a new Terminal window (Applications -> Accessories -> Terminal) and execute the following command:
sudo mount -t vboxsf sharename Desktop/SharedItems
where sharename is the name we given to the folder that we shared in the Host OS and Desktop/SharedItems is the path where we created the folder ‘SharedItems‘ in which the shared folder to be mounted.
(Note: Most Linux OS’s are case-sensitive. So shareditems instead of SharedItems in terminal gives you an error message. Give absolute path instead of Desktop/SharedItems, if you are not in home folder i.e. /home/user/Desktop/SharedItems)
If you login as ‘root user’ you can avoid sudo in the above command.
Now you can access the shared folders and files from SharedItem folder from the Desktop.
Follow Mohammed Safeer On twitter.