Sun VirtualBox is an excellent free virtual machine manager, capable of running nearly any operating system on the market. What many who are new to running virtual machines using VirtualBox don't realize is that their guest machine doesn't have to be isolated from their host machine. This will allow you to use the files that you have on your Linux machine from your Windows box. Configuring a VirtualBox shared folder is actually quite simple. In this article I will be showing you how to configure a shared folder between a Xubuntu Linux guest machine and a Windows XP host machine.
Things You'll Need
- Sun VirtualBox
- Windows host VM
- Linux Guest VM
Create a shared folder on your Windows machine. In this example, I'll make folder called "xubuntushare" on my desktop. Just right-click, select "New", select "Folder", and type the name of the folder you'd like to create.
Start Virtualbox, if you haven't already, select your Linux virtual machine from the list, click "Settings" from the top menu, select "Shared Folders" from the left-hand pane, and click the "Add New Shared Folder" button. Choose your folder from the "Folder Path" field (in my case I just navigated to my desktop and selected "xubuntushare". Finally, name your folder, choose read-only if needed, and click "OK" twice.
Fire up your Lunix virtual machine from VirtualBox. Once you've logged in, select "Devices" from the top menu, and click "Install Guest Additions" if you haven't already. Guest Additions is needed in order to allow the shared folders feature and several others to function correctly. This automatically mounts a virtual installation CD into the machine. If the Linux version you are using has auto-run enabled, simply allow the installation to continue. If it does not, just manually start the installation CD. Allow Guest Additions a moment or two to finish installing, and restart your virtual machine when prompted.
Once the machine comes back up, create a new folder on the Linux guest in the location of your liking. In this example, I just stuck to my desktop again, and created a folder called "share".
Open a Terminal Window on your Linux guest. Many Linux machines open the terminal by combining CTRL+ALT+F1 (F2, F3...). If you're using GNOME (like Ubuntu) go "Applications" > "Accessories" > "Terminal", or in Xfce (like Xubuntu) go "Applications" > "System" > "Terminal".
In the terminal run "sudo mount -t vboxsf sharename mountpoint" where "sharename" is what you called the folder in VirtualBox settings manager (in my case, "xubuntushare"), and "mountpoint" is where you are placing the share on the Linux host machine (in my case, ~/Desktop/share). Enter you password if prompted and continue.
That's all there is to it. Now you can easily share files between your host and guest machine.
Tips & Warnings
- Be sure to back up your data before hand.
- Scan your guest files for viruses before sharing with your host machine.
How to Mount a Windows Shared Folder in Linux
Samba is a free, open-source software system that allows sharing of files and printers between clients on a network. It allows computers...
How to Share Folders in VirtualBox Kubuntu Guest
Sharing folders between a Kubuntu Linux guest operating system (OS) under VirtualBox and your host computer makes moving files between them possible....
How to Mount a VirtualBox Shared Folder in Ubuntu
VirtualBox allows you to install one or more operating systems (the guests) that run on top of the operating system directly installed...
How to Add a Shared Folder in Oracle VirtualBox
If you want to share files from your Oracle VirtualBox, then you must create a shared folder. Oracle VM VirtualBox allows you...