Tuesday, January 2, 2018

VirtualBox Shared Folders

Within VirtualBox, you can enable shared drives to facilitate the transfer of files between the Guest VM and the Host computer.

To install VirtualBox you can follow this guide How to Install VirtualBox
To install a Ubuntu VM you can follow this guide How to Install a Ubuntu Virtual Machine.

To enable Shared Folder between the VirtualBox Host and Guest VM:


Form VirtualBox, select your VM and click Settings

Select Shared Folders, click Add a folder, and choose a local folder, such as
C:\Temp or C:\Dev\VMs\Shared

Select Auto Mount and Permanent, to facilitate usage.

Start the VM and try to access the shared drive.
With Ubuntu, and maybe other Linux versions, you will not have permission, by default.

Per the discussion on StackExchange

Open a Terminal and add your user to the vboxsf user group
sudo usermod -aG vboxsf [youruser]

You will need to reboot your VM for these changes to take effect
And copy a file into the shared folder; you should be able to access it from either the VM or the Host.

No comments:

Post a Comment