Unable to set up Shared Folder using CentOS 7 guest

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

Using Mac OS X Yosemite 10.10.5 as the host OS and CentOS 7 x86_64 as the guest OS, I am unable to get a Shared Folder configured and mounted correctly. I am using VirtualBox 5.0.8. I want to share /Users/<user-name>/Downloads on my host OS. I added this Shared Folder to my Settings of the CentOS 7 x86_64 Virtual Machine and started it up. After logging in, I cannot seem to find this Shared Folder on my guest OS. I did install the VirtualBox Guest Additions. What am I missing?

Thanks,
Jack...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by Perryg »

Have you read the manual about shared folders? http://www.virtualbox.org/manual/ch04.h ... redfolders
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

Perryg wrote:Have you read the manual about shared folders?
Yes I have read that section. I tried both the Manual and Automatic mounting approaches.

Using the Manual approach it failed with the message "mounting failed with the error: No such device". I used the following command that resulted to the previously mentioned message: sudo mount -t vboxsf Downloads /home/<user-name>/Downloads

Using the Automatic approach the /media folder is empty and does not contain the "sf_Downloads" folder.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by Perryg »

Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

Perryg wrote:Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
See attachment.
Attachments
VBox.log.zip
VirtualBox Log Files for the CentOS 7 x86_64 Virtual Machine
(89.21 KiB) Downloaded 204 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by Perryg »

Code: Select all

Host path '/Users/<user-name>/Downloads', map name 'Downloads', writable, automount=false, create_symlinks=false, missing=false
Is <user-name> your real logon name or are you obfuscating the name to keep it private?

sudo mount -t vboxsf Downloads /home/<user-name>/Downloads
Does the path indicated above actually exist and the case accurate?
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

Perryg wrote:

Code: Select all

Host path '/Users/<user-name>/Downloads', map name 'Downloads', writable, automount=false, create_symlinks=false, missing=false
Is <user-name> your real logon name or are you obfuscating the name to keep it private?
Yes, I obfuscated it. You could read it as '/Users/johndoe/Downloads', which is an existing directory on the host OS.
Perryg wrote:

Code: Select all

sudo mount -t vboxsf Downloads /home/<user-name>/Downloads
Does the path indicated above actually exist and the case accurate?
Yes, it does exist. Using the same name as above, '/home/johndoe/Downloads' is an existing directory on the guest OS.
Last edited by oosie on 27. Oct 2015, 04:03, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by Perryg »

As far as I can tell the host path and mount type are accurate. VirtualBox sees this as true as well as stated in the guest log file as well as the guest additions being installed.

That puts it in the guest and if the mount point does in fact exist and it does not produce an error when you run the mount statement then I have no idea what could be wrong. At this point I will have to stand back and see if a Mac user can see what I might have missed but I will watch this thread for further clues and let you know if I see something that could help.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by loukingjr »

FWIW, I have 22 guests running on my primary OSX host running OSX 10.11.1 of various kinds including Debians, Fedoras, Mints, Manjaro (Arch) and Ubuntu guests and shared folders work in all of them except, with my LMDE2 guest, the files wouldn't load in the shared folder but it did show in /media. rolling back to the 5.0.4 GAs fixed that.

I suppose I could install CentOS 7 and see what happens.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by loukingjr »

I got around to installing CentOS 7 in VB 5.0.8. I set up an Auto-mount shared folder and it mounted in /media as expected. So this Mac user doesn't know what might be wrong.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by loukingjr »

Could the fact that there are two .vdis for the guest cause this problem? Or the hyphens in the names?
00:00:00.809176 File system of '/Users/<user-name>/VirtualBox VMs/CentOS 7 x86_64 - Stand-Alone/System.vdi' is hfs
00:00:00.811542 File system of '/Users/<user-name>/VirtualBox VMs/CentOS 7 x86_64 - Stand-Alone/Java.vdi' is hfs
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

loukingjr wrote:Could the fact that there are two .vdis for the guest cause this problem? Or the hyphens in the names?
00:00:00.809176 File system of '/Users/<user-name>/VirtualBox VMs/CentOS 7 x86_64 - Stand-Alone/System.vdi' is hfs
00:00:00.811542 File system of '/Users/<user-name>/VirtualBox VMs/CentOS 7 x86_64 - Stand-Alone/Java.vdi' is hfs
When I started I only had the single System.vdi and I could not get the Shared Folders to work. I only added the Java.vdi recently. In regards to the hyphens, I also run VirtualBox on a Windows 7 Pro host OS with Virtual Machines containing multiple .vdis, Shared Folders and hyphens in the path names without a problem. Would the support for hyphens in the path names differ depending on the chosen host OS?
oosie
Posts: 6
Joined: 26. Oct 2015, 21:26

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by oosie »

loukingjr wrote:I got around to installing CentOS 7 in VB 5.0.8. I set up an Auto-mount shared folder and it mounted in /media as expected. So this Mac user doesn't know what might be wrong.
Thanks for giving the similar scenario a try! At least that gives me hope that this should work.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Unable to set up Shared Folder using CentOS 7 guest

Post by loukingjr »

oosie wrote:When I started I only had the single System.vdi and I could not get the Shared Folders to work. I only added the Java.vdi recently. In regards to the hyphens, I also run VirtualBox on a Windows 7 Pro host OS with Virtual Machines containing multiple .vdis, Shared Folders and hyphens in the path names without a problem. Would the support for hyphens in the path names differ depending on the chosen host OS?
Probably not. But a new version of VirtualBox might. There are occasional regressions but from what you say it's probably not that. I don't know what it might be. I have OSX 10.11.1 running on three different Macs, all with VB 5.0.8 and haven't had an issue with shared folders on multiple guests on any of them except LMDE2.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply