I’ve written about enabling Guest Additions on Windows 7 Beta 1 in VirtualBox. While most items work, such as mouse integration and Auto-resize Guest Display, one of the items that still doesn’t correctly function is Shared Folders. Fret not, because there is a simple workaround that can provide basic functionality. Also note, that this method works for any Windows guest, and could be adapted for a variety of other guests.
First, a quick word about the host OS: It must be running some implementation of Microsoft Windows network file system (SMB/CIFS) networking to work. If the host OS is Windows, you’re all set. If you’re on a Mac or Linux host environment, you’ll need to use Samba. Fortunately, Samba is nicely integrated with modern Mac and Linux releases. As for the guest OS, you’ll need to have some sort of networking enabled. With the revamped host networking in 2.1, I highly recommend you use that if at all possible.
As long as the above requirement is met, you may share the folder you want to access. I say “may” only because if your host OS is Windows, you can access the hidden drive shares directly. If this is the case, skip the next section and head right for the next paragraph. If you’re new to sharing a folder, here are the steps to accomplish it.
- Right-click the folder name and choose, “Share…”
- Verify the user with access is correct. It should be your current account and have Owner privileges
- Click Share
- Browse to a folder using Nautilus (your default file manager when using Gnome)
- Right-click and choose “Sharing Options”
- If this is your first time enabling sharing, you will be prompted to install the service. Authenticate and let the package manager download and configure Samba. I was prompted to reboot my computer, however, I did not reboot and was still able to continue configuring the shared folder
- Sorry, I don’t have a Mac. If anyone wants to buy me one, or just generate some revenue through ad clicks, I would appreciate it!
You should then be able to access the share by browsing “\localhostsharename”. If you opted to skip creating a share, and want to use the built-in hidden shares, specify “C$” as the share name. Authenticate if necessary and you should be browsing your shared folder locally.
- Once that is complete, switch over to your VM installation (Windows 7 or otherwise)
- Bring up Computer (Start Orb→Computer)
- Click the “map network drive” button
- The “Map Network Drive” dialog box will open and you should configure several items:
- Drive: Specify your preferred drive letter. I chose “S:”, but any available letter will work fine.
- Folder: This should be defined as “\HostComputerShareName”. Alternatively, you can specify the IP address instead of hostname. Because you are now on the guest OS, this should not be “localhost” as above.
- Connect using different credentials: I like to check this, just to ensure I can specify the correct login and password instead of using my current user.
- Press the Finish button
A new window should open with your new share. You can also minimize this window – exposing the underlying Computer window. A new drive letter under Network Location should be available.
That’s it, you’re done. Windows shares don’t always behave as easily as they should, so if you encounter an error, don’t give up. Keep trying and post the error in the comments.