Skip to content

Instantly share code, notes, and snippets.

View linuxipho's full-sized avatar

Rémi de Chazelles linuxipho

  • Montpellier
View GitHub Profile
@linuxipho
linuxipho / mount_vbox_shared_boot.md
Created November 14, 2023 11:22 — forked from kentwait/mount_vbox_shared_boot.md
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows