<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ceamore</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ceamore"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Ceamore"/>
	<updated>2026-05-12T00:16:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VirtualBox_shared_folders&amp;diff=23049</id>
		<title>VirtualBox shared folders</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VirtualBox_shared_folders&amp;diff=23049"/>
		<updated>2023-03-14T14:19:09Z</updated>

		<summary type="html">&lt;p&gt;Ceamore: Update to use current library of linux-virt.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 3.11 and newer ==&lt;br /&gt;
Enable the Community repo in /etc/apk/repositories then:&lt;br /&gt;
&lt;br /&gt;
Create a mount point and install libraries&lt;br /&gt;
{{Cmd|mkdir -p /mnt/shared&lt;br /&gt;
apk add virtualbox-guest-additions linux-virt&lt;br /&gt;
reboot}}&lt;br /&gt;
Then mount the folder&lt;br /&gt;
{{Cmd|modprobe -a vboxsf &lt;br /&gt;
mount -t vboxsf  vbox_shared /mnt/shared}}&lt;br /&gt;
&lt;br /&gt;
vbox_shared is the &#039;Folder Name&#039; you decided in the virtualbox gui&lt;br /&gt;
== 3.8 - 3.10 ==&lt;br /&gt;
As of 3.8 release, simply enable the Community repo in /etc/apk/repositories then run:&lt;br /&gt;
{{Cmd|apk add virtualbox-guest-additions virtualbox-guest-modules-virt}} &lt;br /&gt;
Reboot system&lt;br /&gt;
{{Cmd|modprobe -a vboxsf&lt;br /&gt;
mount -t vboxsf vbox_shared /mnt/outside}}&lt;br /&gt;
&lt;br /&gt;
=== Permanent shares ===&lt;br /&gt;
To set up a permanent share, enable vboxsf module and mount at startup.&lt;br /&gt;
Change &#039;&#039;vbox_shared&#039;&#039; to your foldername in Virtualbox dialog, maybe adjust the path /mnt/outside twice to your needs.&lt;br /&gt;
{{Cmd|echo vboxsf &amp;gt; /etc/modules-load.d/vboxsf.conf&lt;br /&gt;
rc-update add local default&lt;br /&gt;
mkdir /mnt/outside&lt;br /&gt;
echo mount -t vboxsf &#039;&#039;vbox_shared&#039;&#039; /mnt/outside &amp;gt; /etc/local.d/outside.start&lt;br /&gt;
chmod +x /etc/local.d/outside.start}}&lt;br /&gt;
Reboot system&lt;br /&gt;
&lt;br /&gt;
== 3.7 and previous ==&lt;br /&gt;
&lt;br /&gt;
Install [https://pkgs.alpinelinux.org/package/edge/community/x86/virtualbox-guest-additions virtualbox-guest-additions] and [https://pkgs.alpinelinux.org/package/edge/community/x86/virtualbox-guest-modules-virthardened virtualbox-guest-modules-virthardened] at first:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add virtualbox-guest-additions virtualbox-guest-modules-virthardened}}&lt;br /&gt;
&lt;br /&gt;
The following error may occur:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|ERROR: unsatisfiable constraints:&lt;br /&gt;
  virtualbox-guest-additions (missing):&lt;br /&gt;
    required by: world[virtualbox-guest-additions]&lt;br /&gt;
  virtualbox-guest-modules-virthardened (missing):&lt;br /&gt;
    required by: world[virtualbox-guest-modules-virthardened]}}&lt;br /&gt;
&lt;br /&gt;
If the error occurs, make sure your alpine version is greater than v3.6 and alpine community repo is enabled:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo &amp;quot;http://dl-cdn.alpinelinux.org/alpine/edge/community&amp;quot; &amp;gt;&amp;gt; /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
Update respository indexes from all remote repositories, then install guest modules and reboot:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk update&lt;br /&gt;
apk add virtualbox-guest-additions virtualbox-guest-modules-virthardened&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
Goto &amp;lt;code&amp;gt;Device &amp;gt; Shared Folders &amp;gt; Shared Folder Settings ...&amp;lt;/code&amp;gt; add a directory mapping like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Add_Share.png|437px]]&lt;br /&gt;
&lt;br /&gt;
Mount it to alpine:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mkdir /mnt/outside&lt;br /&gt;
mount -t vboxsf vbox_shared /mnt/outside}}&lt;br /&gt;
&lt;br /&gt;
which &amp;lt;code&amp;gt;vbox_shared&amp;lt;/code&amp;gt; is your folder name and &amp;lt;code&amp;gt;/mnt/outside&amp;lt;/code&amp;gt; is the mounting point.&lt;br /&gt;
&lt;br /&gt;
After this step the following error may occur:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mount: mounting vbox_shared on /mnt/outside failed: No such device}}&lt;br /&gt;
&lt;br /&gt;
If the error occurs, run command below:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe -a vboxsf&lt;br /&gt;
mount -t vboxsf vbox_shared /mnt/outside}}&lt;br /&gt;
&lt;br /&gt;
And you will see &amp;lt;code&amp;gt;/tmp/vbox_shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/mnt/outside&amp;lt;/code&amp;gt; are connected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;P.S. Alpine will raise error &amp;quot;Invalid argument&amp;quot; if &amp;lt;code&amp;gt;virtualbox-guest-additions&amp;lt;/code&amp;gt; is not installed when mounting drive.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;VirtualBox will raise error &amp;quot;Guest Additions unavailable&amp;quot; if &amp;lt;code&amp;gt;virtualbox-guest-modules-virthardened&amp;lt;/code&amp;gt; is not installed when adding shared path.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>Ceamore</name></author>
	</entry>
</feed>