How to add VirtualBox Shared Folders to Guest VMs on macOS

02/17/2018
  1. Install VirtualBox
  2. Install the guest OS. I like to use Ubuntu Server
  3. Attach VirtualBox Guest Additions in VirtualBox by clicking Devices -> Insert Guest Additions CD Image
  4. Mount the disk to a folder, I used sudo mount /dev/cdrom /mnt/cdrom
  5. Run install sudo ./VBoxLinuxAdditions.run
  6. Reboot the vm, sudo shutdown -r now
  7. Last, mount your shared folder sudo mount –t vboxsf {host shared folder name} {guest mount directory}
  8. Profit!

What about mounting on reboots?

While using Ubuntu Server 16.04.3 LTS:

  1. Add /etc/fstab entries for folders you want to mount
    • For example: PlexMedia /mnt/plex-media vboxsf defaults,uid=1000,gid=1000 0 0
  2. Add vboxsf to a line of its own in /etc/modules
  3. Profit! Now when the VM is rebooted the shared folders will be remounted.

But What About Permissions?

  1. sudo usermod -a -G vboxsf kevin