Wednesday, October 5, 2011

Access Shared Folders in a VirtualBox Ubuntu 11.04 Virtual Machine


00_shared_folder_in_nautilus
Have you installed Ubuntu 11.04 as a virtual machine in VirtualBox but have had problems getting the Shared Folders feature to work? We were able to add a shared folder, but were unable to access it.
We found the secret to accessing shared folders in an Ubuntu 11.04 virtual machine in VirtualBox. VirtualBox adds a user group called “vboxsf” to the Ubuntu 11.04 virtual machine. Any user that needs to have access to shared folders defined for that virtual machine need to be a member of that group. This article shows you how to add a user to the vboxsf group.
Setting up shared folders in VirtualBox is fairly straightforward. Select Shared Folders from the Devices menu.
01_selecting_shared_folders_option
The Shared Folders screen on the Settings dialog box displays. Use the buttons on the right side to add folders from your host machine to the Folders List. Refer to the help in VirtualBox for more information about adding shared folders.
02_shared_folders_settings
Once you have added your shared folders in VirtualBox, you must add users in the Ubuntu 11.04 virtual machine to the vboxsf group created by VirtualBox. To do this, select Administration | Users and Groups from the System menu in the Ubuntu virtual machine.
03_selecting_users_and_groups
On the Users Settings dialog box, click Manage Groups.
04_clicking_manage_groups
The Groups settings dialog box displays. Scroll down in the list of groups and select the vboxsf group. Click Properties.
05_clicking_properties_for_group
On the Properties box for the vboxsf group, select the check boxes in the Group Members box for the users you want to add to the vboxsf group and click OK.
06_adding_user_to_group
To make this change, you must provide authentication. Enter your user account password in the Password edit box and click Authenticate.
07_authenticate_dialog
You are returned to the Groups settings dialog box. Click Close and then also click Close on the Users Settings dialog box.
08_closing_group_settings_dialog
Now, you should be able to access your shared folders in the /media/sf_Ubuntu_11.04 folder.
NOTE: The name of the folder inside the media folder that contains the shared folders in VirtualBox always starts with “sf_” and continues with the name of your virtual machine.
10_pasting_into_a_shared_folder
Remember to add any new users you add to your Ubuntu 11.04 virtual machine to the vboxsf group if you want them to be able to access the shared folders.