Skip to content

Instantly share code, notes, and snippets.

@ming4883
Last active June 22, 2024 03:08
Show Gist options
  • Save ming4883/4f0439e6e256fd952407d4f43ee708b5 to your computer and use it in GitHub Desktop.
Save ming4883/4f0439e6e256fd952407d4f43ee708b5 to your computer and use it in GitHub Desktop.
Alpine Virtual Box shared folder setup
apk update
apk add virtualbox-guest-additions virtualbox-guest-modules-virthardened
# auto load vboxsf kernel module
echo vboxsf > /etc/modules-load.d/vboxsf.conf
reboot
# enable local service in openrc
rc-update add local default
# create mount point folder
mkdir /mnt/outside
# auto mount after reboot
echo mount -t vboxsf vbox_shared_folder_name /mnt/outside > /etc/local.d/outside.start
chmod +x /etc/local.d/outside.start
reboot
@c33s
Copy link

c33s commented Feb 26, 2023

according to a currently visible todo notice on the top on https://wiki.alpinelinux.org/wiki/VirtualBox_shared_folders "Need to update this article. I think the virtualbox-guest-modules-virt package has been obsoleted by linux-virt on 3.11 and later" it worked for me like that (alpine 3.17):

echo "create a shared folder via the gui and name it 'vbox_shared'"
mkdir -p /mnt/outside
apk add virtualbox-guest-additions linux-virt
reboot
modprobe -a vboxsf 
mount -t vboxsf vbox_shared /mnt/outside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment