[solved] Virtualbox shared folder is empty (mount failed)

Hey, i'm new to linux and trying to realize a Dualboot (Windows 10 - Manjaro 18.0.4 Xfce) setup while also beeing able to start the Manjaro OS as a guest via VBox.

Doing some pretesting with a Manjaro guest i was able to mount a shared folder in "/media/sf_..." but the folder is empty and not reflecting/showing changes on either side (Host / Guest).

To set the shared folder up i followed the Tutorial. Other threads on this topic didnt help me to find a solution. Do you have any advice for me?

i'm not sure i fully understand your setup and expected result. let's see if i got it right.

you have a non-empty folder on your physical machine (host) running manjaro, something like ~/test for example. you're mounting this folder in virtualbox virtual machine (guest) settings and giving it a name, say, test. than, having installed guest additions on the guest manjaro and having made sure the user on the virtual machine is in the vboxusers group, you expect to see the contents of the shared folder in /media/sf_test folder on the virtual machine, and it's just not there, is that about it?

several quick questions:

  1. have you restarted the guest manjaro after installing the guest additions?
  2. does the service vboxservice.service run on the guest machine? (systemctl status vboxservice)
  3. does the mount operation appear in the service log (journalctl -u vboxservice | grep automount) and is it marked successful?
  4. does the configured shared folder (/media/sf_test in out hypothetical scenario) appear at all on the guest system? (s -d /media/sf_*)
  5. does the ownership look good? should be root/vboxsf (ls -ld /media/sf_*)
  6. if it does, does your user have read/write acces to it? (touch /media/sf_test/test.txt && ls -l /media/sf_test/test.txt)

p.s. welcome to the forum :wink:

1 Like

Hey @tivasyk,
Right now my setup is a Windows10 Host and Manjaro Guest and i am just trying to get SF working for now.
Thanks for your beginner friendly questions / instructions! :kissing_heart: and the welcome :wink:.
Question 1, 2 and 4 are good.

Question 3:

May 01 13:47:06 asd-pc VBoxService[271]: 17:47:06.866229 automount Error: 
vbsvcAutomounterMountIt: Failed to mount 'test123' on '/media/sf_test123' 
because it is probably mounted elsewhere arleady! (-1,22)

I dont know what to do here. However the folder does not seem to be mounted elsewhere, there are no other folders with that name on the system.

Question 5:

[asd@asd-pc ~]$ ls -ld /media/sf_test123
drwxr-xr-x 2 root root 4096 May  1 13:47 /media/sf_test123

Question 6:

[asd@asd-pc ~]$ touch /media/sf_test123/test.txt && ls -l /media/sf_test123/test.txt
touch: cannot touch '/media/sf_test123/test.txt': Permission denied

Would it be correct way to change the Group to vboxsf ("chown -R root:vboxsf /media/*") ?

i tried "sudo mount -t vboxsf test123 /media/sf_test123/" (VirtualBox Manual). Then the folder is mounted succesfully and my user has read/write access (while the permissions are still wrong). That is only till next restart of course.

for the moment, i can't reproduce this problem. i tried creating a folder /media/sf_test as root before configuring the share, but on my system virtualbox is still capable to re-mount it over without as much as a warning, so once configured, the share is there with the contents as expected.

we need to google it some more. your response to question 3 is an indicator.

update. found this:

For now, a simple workaround is to mount your shared folder via fstab:
SHARE_NAME /media/sf_SHARE_NAME vboxsf uid=1000,gid=1000,rw,dmode=700,fmode=600,noauto,x-systemd.automount

warning. messing with fstab can (relatively easy) prevent your guest system from loading, try to be very attentive when editing it (sudo cp /etc/fstab /etc/fstab.backup && sudo nano /etc/fstab). in your case the line to add to the bottom of the file would be:

test123 /media/sf_test123 vboxsf uid=1000,gid=1000,rw,dmode=700,fmode=600,noauto,x-systemd.automount


Thanks a lot, this did work in the end! :smiley:

Only a minor issue, there are two devices for the same SF now:

The second appears to be unmountable, but isn't. Klicking on it will actually open the first sf_test device.
Is there a way remove/prevent it?

Since that is solved i can finally try setting up the dualboot :slight_smile:

Since that is solved i can finally try setting up the dualboot

there, you're asking for more problems to solve =) well, it's your choice, no questions. i'll share my experience, just in case.

i do need to run windows apps from time to time. for this, instead of going dualboot, i keep wine for (some) games and i have a virtual machine on virtualbox for more serious applications. this way, when things go wrong, it almost never blocks me from booting my physical machine.

p.s. maybe try adding [solved] to the topic?

1 Like

you were right. i just gave up. Will stay with windows only and linux as guest.

Will stay with windows only and linux as guest.

personally, i do hope you do the switch sooner or later, just give your virtual machine with linux some time, you're going to love it.

Since I am facing (almost) the same issue at the moment (the difference is both entries are automounted), is there a workaround for this?

The shared folders from VirtualBox are very strange since VBox 6. Under VBox 6.0.12, I managed to get them automount with only the guest addition from VBox (removing the guest utils from Manjaro). But today, I updated to 6.0.14, they don't work, either with the guest additions or with the guest utils. I tried to revert back to 6.0.12 and they don't work any longer, not sure why. So I have to put the shared folders under fstab, which I tried to avoid. Hopefully someday this can get correctly solved!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by