Saturday, November 14, 2015

VirtualBox auto mount shared folder

The post demonstrate how to "Install Ubuntu GNOME 15.10 on Windows 10/VirtualBox", and also share folder between Windows host and Ubuntu guest user folder, in command line/shell script.


Starting with version 4.0, VirtualBox can mount shared folders automatically. In case on Linux guests, auto-mounted shared folders are mounted into the /media directory, along with the prefix sf_. For example, the shared folder myfiles would be mounted to /media/sf_myfiles on Linux and /mnt/sf_myfiles on Solaris.

Access to auto-mounted shared folders is only granted to the user group vboxsf, which is created by the VirtualBox Guest Additions installer. Hence guest users have to be member of that group to have read/write access or to have read-only access in case the folder is not mapped writable.

(reference: https://www.virtualbox.org/manual/ch04.html#sf_mount_auto)

In order to use the share folder feature, you have to "Insert Guest Additions CD images".


The below video show how to create share folder between host Windows (D:\vbShare) and guest Ubuntu Linux (/media/sf_vbShare), and add current user to the vboxsf group with the command:
$ sudo usermod -a -G vboxsf eric
where:
vboxsf is the user group own the shared folder
eric is the the current user


No comments:

Post a Comment