[SOLVED] VirtualBox shared folders

Questions about virtualization software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Mage of Maple
Level 2
Level 2
Posts: 62
Joined: Tue Jul 10, 2018 10:41 am
Location: Maryland USA
Contact:

[SOLVED] VirtualBox shared folders

Post by Mage of Maple »

Hello,

I'm having an issue with shared folders. (they don't work.) My host is Mint 19 and my guest in Mint 19. I'm running the network in bridged mode. I have guest additions installed. A created the share with AutoMount set to yes. I've turned the firewall off on both host and guest. If it matters, I'm running Mullvad VPN on both the host and the guest.

Basically, I see nothing mounted in /media/greg. Attempting to mount it manually gives "mounting failed with the following error: Protocol error"

Any ideas?

Thanks!
Greg
Last edited by Mage of Maple on Wed Dec 19, 2018 8:10 pm, edited 1 time in total.

redlined

Re: VirtualBox shared folders

Post by redlined »

hi Greg!

I'm new to linux and don't use virtualbox but I really think it is VPN setup, especially if both host and guest are each connected to VPN and routes are complicting things by doing so- unless you've got routes tweaked as a known issue.

This help/answer response may help with your issue which sounds close enough related to fix your issue:
https://superuser.com/questions/987150/ ... hrough-vpn

User avatar
AndyMH
Level 11
Level 11
Posts: 3994
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: VirtualBox shared folders

Post by AndyMH »

I assume you have set up shared folders in VB through the settings:
Screenshot from 2018-12-16 22-38-49.png
Then in the VM (in my case win7) they appear as network drives (so I suspect with mint in a VM you need to go computer > network):
Capture.PNG
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

ajgringo619
Level 7
Level 7
Posts: 1687
Joined: Thu Mar 01, 2018 8:36 pm
Location: San Diego, California, USA

Re: VirtualBox shared folders

Post by ajgringo619 »

Once you get it running, make sure you're in the vboxsf group on the guest.
Mint 19.3 XFCE
kernel 5.4.0-40-generic
AMD FX-8350 Eight-Core w/16 GB RAM
AMD Radeon R9 290/390 w/4GB RAM
Image

User avatar
Mage of Maple
Level 2
Level 2
Posts: 62
Joined: Tue Jul 10, 2018 10:41 am
Location: Maryland USA
Contact:

Re: VirtualBox shared folders

Post by Mage of Maple »

Thanks for the help, everyone. I've got it working now. It was something I wasn't even thinking of but I should have been - not the first time this has burned me.

VirtualBox was running under Firejail. When I installed Firejail, I used firecfg to automatically set up sandboxing for all installed apps that it had default configurations for. Unfortunately, this creates various problems. It breaks the Linux Mint "X-Apps" entirely, which I solved by just unlinking them from /usr/local/bin. (I don't need my text editor sandboxed.) But I do like the idea of having VirtualBox sandboxed. The primary reason I run a Mint VirtualBox guest on a Mint host is so that I can do some things with less fear of corrupting my system. Most notably, I use Wine and this potentially exposes me to Windows viruses, so I do that in my guest (along with most things I do), but do all online banking, etc, on the host. In theory, it should not be possible for a virus to bust out of a VM anyway, but sandboxing gives me another layer of protection. Unfortunately, it breaks the shared folders, which I guess kinda makes sense as that would be a potential avenue for escape (although networking in general does work.) I guess I need to look into the Firejail configuration stuff and see if I can change the profile for VirtualBox to allow this...

Anyway, thanks everyone! :)

Laugh2
Level 3
Level 3
Posts: 193
Joined: Fri Aug 16, 2013 4:01 am

Re: VirtualBox shared folders

Post by Laugh2 »

ajgringo619 wrote:
Sun Dec 16, 2018 7:06 pm
Once you get it running, make sure you're in the vboxsf group on the guest.
Thank you, ajgringo619. You comment solved my problem - I was being told I didn't have permissions to access the folder when inside my Guest. Adding myself to this group (also inside the Guest) solved the problem.
:D
For anyone unfamiliar with how to do this, I found a CLI command by 1Fallen at https://ubuntuforums.org/showthread.php?t=2411025:

sudo usermod -G vboxsf -a myusername

change "myusername" to your login user name and make sure the VirtualBox Guest Additions are installed. Reboot.

My System
Host: LM18.3 64-bit
VirtualBox Version 6.0.6 r130049 (Qt5.6.1)
Guest: LM 19.1 64-bit

Post Reply

Return to “Virtualization”