Last active
November 8, 2024 01:53
-
-
Save ming4883/4f0439e6e256fd952407d4f43ee708b5 to your computer and use it in GitHub Desktop.
Alpine Virtual Box shared folder setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
Didn't work for me
localhost:~/outside# mount -t vboxsf shared /root/outside
mount.vboxsf: mounting failed with the error: No such device
mount: mounting shared on /root/outside failed: No such device