VirtualBox shared folders: Difference between revisions

From Alpine Linux
(Created page with " == Enable VirtualBox shared folders == Install [https://pkgs.alpinelinux.org/package/edge/community/x86/virtualbox-guest-additions virtualbox-guest-additions] and [https://...")
 
No edit summary
Line 48: Line 48:




''P.S. Alpine will raise error "Invalid argument" if <code>virtualbox-guest-additions</code> is not installed when mounting drive.
''P.S. Alpine will raise error "Invalid argument" if <code>virtualbox-guest-additions</code> is not installed when mounting drive.''


VirtualBox will raise error "Guest Additions unavailable" if <code>virtualbox-guest-modules-virthardened</code> is not installed when adding shared path.''
''VirtualBox will raise error "Guest Additions unavailable" if <code>virtualbox-guest-modules-virthardened</code> is not installed when adding shared path.''

Revision as of 08:09, 28 May 2017

Enable VirtualBox shared folders

Install virtualbox-guest-additions and virtualbox-guest-modules-virthardened at first:

apk add virtualbox-guest-additions virtualbox-guest-modules-virthardened

The following error may occur:

ERROR: unsatisfiable constraints: virtualbox-guest-additions (missing): required by: world[virtualbox-guest-additions] virtualbox-guest-modules-virthardened (missing): required by: world[virtualbox-guest-modules-virthardened]

If the error occurs, make sure your alpine version is greater than v3.6 and alpine community repo is enabled:

echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories

Update respository indexes from all remote repositories, then install guest modules and reboot:

apk update apk add virtualbox-guest-additions virtualbox-guest-modules-virthardened reboot

Goto Device > Shared Folders > Shared Folder Settings ... add a directory mapping like this:

Mount it to alpine:

mkdir /mnt/outside mount -t vboxsf vbox_shared /mnt/outside

which vbox_shared is your folder name and /mnt/outside is the mounting point.

After this step the following error may occur:

mount: mounting vbox_shared on /mnt/outside failed: No such device

If the error occurs, run command below:

modprobe -a vboxsf mount -t vboxsf vbox_shared /mnt/outside

And you will see /tmp/vbox_shared and /mnt/outside are connected.


P.S. Alpine will raise error "Invalid argument" if virtualbox-guest-additions is not installed when mounting drive.

VirtualBox will raise error "Guest Additions unavailable" if virtualbox-guest-modules-virthardened is not installed when adding shared path.