VirtualBox is a virtualization software that allows users to host multiple guest operating systems on a single host computer. We wrote about VirtualBox on this site and it’s a great tool for IT professionals to have.
And for students studying to become IT professionals, they should definitely have VirtualBox among their collections of important software to reach our for.
This brief tutorial is going to show students how to access shared folders on VirtualBox host computer from the guest machines. If you’ve used VirtualBox before, you know there’s no easy way to get content from the host computer to the guest OS.
You may be able to copy and paste text and small form data, but not huge data folders and other data formats. But with VirtualBox shared folder feature, you can enable the guest machine to directly access the host content.
[alert-note]For VirtualBox shared folder feature to work, you install the guest addition software.[/alert-note]
Step 1: Install VirtalBox Guest Addition Software
In order to for the shared folder feature to work in VirtualBox, you must install its guest addition software. To learn how to do that, read the post below.
Step 2: Sharing the Host Folders
Now that VirtualBox guest tools are installed, you can now go and share the host content you wish the guests to access. That can be done from VirtualBox settings on the host computer.
Open the host software and select Settings –> Shared Folders –> click the plus ( + ) sign on the folder icon to create a new share. Then browse to the folder on the host computer you want to share and save.
Step 3: Accessing the Host Shares from Ubuntu guests
To access the host shares from Ubuntu guest machines, logon and run the command below to add your account to VirtualBox service user group. By default, you won’t be able to access the shared content unless you’re a member of the vboxsf group.
To add yourself to the group, run the commands below
sudo adduser your_username_here vboxsf
For example, If my account name is richard.. I’d type sudo adduser richard vboxsf
After that, logout of Ubuntu desktop and log back in, then open Nautilus file explorer and you should see the host shared folder on the left menu starting with sf_Folder_Name
Or navigate to Computer => media => Shared_Folder to view the content there.
Step 4: Accessing the Host shares from Windows guests
For Windows guest machines, the shared folder will be listed in Windows File explorer and you should be able to access it without first changing its permissions.
This is how to shared VirtualBox host folder and access it from the guest machines.