How do I automatically mount my shared folder?

Discussions about using Linux guests in VirtualBox.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How do I automatically mount my shared folder?

Post by Perryg »

@samdanu,

I have no idea what your actual problem is. I would suggest that you report this to bugtracker. You will need to setup an account there as it is on a different system.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.
samdanu
Posts: 13
Joined: 26. May 2011, 19:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by samdanu »

Dear Perryg,

Someone posted the same issue in the bugtracker site. I will attached it below.

This person in experiencing the problem in Windows Guest, whilst I am experiencing it in Ubuntu 11.04 Guest. No one has responded to the issue yet though.

See attachment. May be this will help you understand....
Attachments
V-Box shared Folder Warning
V-Box shared Folder Warning
vbox-shared-folder.PNG (15.45 KiB) Viewed 8562 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: How do I automatically mount my shared folder?

Post by Perryg »

do you have the link to the ticket?
Did you also add your name?
samdanu
Posts: 13
Joined: 26. May 2011, 19:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by samdanu »

This is the link to the ticket: http://www.virtualbox.org/ticket/8954
samdanu
Posts: 13
Joined: 26. May 2011, 19:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by samdanu »

Dear Perryg,

How are you? I want to find out if you've been able to find a solution to my problem above. I am still not able to mount my shared folder in virtualbox. I have removed the guest OS and unisntalled virtualbox as well. I am planning of doing a clean installation of the guest OS.

Is it necessary to install Networking Component of virtualbox for my ubuntu guest whilst installing it in vurtaulbox? If yes, how do I manage the Guest network from that of the host?

Please advise.

Regards,

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

Re: How do I automatically mount my shared folder?

Post by Perryg »

Samuel,
You havd posted your issue with the DEVs but you have not given them enough information to go on. You need to post the guests log file (as an attachment) to the ticket as well as give them some more details to work with or I am sure they will not respond.

As for installing if you want it to work you need to install it to begin with, so yes you need the network component installed. When installing the guest just select the defaults and you should have a working connection to the Internet.
afe123
Posts: 3
Joined: 13. Jun 2011, 02:43
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by afe123 »

Hi,

I have a similar issue on OS X Snow Leopard, running guest OS Ubuntu 11.04 64-bit. I installed guest additions, set up shared folder, but it does not appear to be mounted after the system is boot up.

Looking at the log, I have this message:

00:00:00.428 SharedFolders host service: adding host mapping
00:00:00.428 Host path '/Users/fedorov/VirtualBox_shared', map name 'VirtualBox_shared', read-only

My shared folder has r-x permissions for all users, but on the guest system after boot I don't have it mounted

fedorov@fedorov-VirtualBox:~$ ls -la /media/
total 8
drwxr-xr-x 3 root root 4096 2011-06-12 20:47 .
drwxr-xr-x 22 root root 4096 2011-06-10 18:55 ..
drwxrwx--- 1 root vboxsf 68 2011-06-10 18:36 sf_VirtualBox_shared
afe123
Posts: 3
Joined: 13. Jun 2011, 02:43
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by afe123 »

afe123 wrote:
I have a similar issue on OS X Snow Leopard, running guest OS Ubuntu 11.04 64-bit. I installed guest additions, set up shared folder, but it does not appear to be mounted after the system is boot up.
Nevermind -- this has been resolved
samdanu
Posts: 13
Joined: 26. May 2011, 19:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by samdanu »

Dear Afe123,

I would like to know how you resolved the issue. Please put it here step by step for me.

Thanks in advance.

Samuel.
afe123
Posts: 3
Joined: 13. Jun 2011, 02:43
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by afe123 »

samdanu wrote:Dear Afe123,

I would like to know how you resolved the issue. Please put it here step by step for me.

Thanks in advance.

Samuel.
I was not able to access the shared folder, because the user was not in vboxfs group. After adding the user to that group, the access was enabled. The "Broken folder" message you are getting is likely due to your attempts to share a folder that is already shared. I had the same error. hope this helps.
samdanu
Posts: 13
Joined: 26. May 2011, 19:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 11.04

Re: How do I automatically mount my shared folder?

Post by samdanu »

I don't see the shared folder in my Guest OS after booting. I have added the user to the vboxsf group already. I still get that message 'broken shared folder' What do I do now?
JohnA
Posts: 1
Joined: 19. May 2012, 01:54

Re: How do I automatically mount my shared folder?

Post by JohnA »

I know this topic is old, from 2008. Nonetheless, here's what worked for me:
  • use vbox to create the shared folder
    • use Machine Folder
    • set Folder Path to the path on the Host (ubuntu). e.g. /home/hostuserid/projects/hostdir
    • set Folder Name to the name you'd like to use in the Guest e.g. myhostdir. Note the names don't have to match
    • make sure it is not read-only
    • do not auto-mount
    • make it permanent
  • reboot the Guest. I'm not absolutely sure this step is necessary. But it does seem to be that the Folder Name isn't available until a reboot occurs.
  • in the Guest (ubuntu)

    Code: Select all

      mkdir /home/guestuserid/projects/guestdir
      sudo gedit /etc/fstab
      [add the following line]
      myhostdir /home/guestuserid/projects/guestdir vboxsf rw,gid=1000,uid=1000 0 0
      [save & close gedit]
    
      sudo mount -a
      [there should be no output]
    
  • test it on the Guest

    Code: Select all

      cd /home/guestuserid/projects/guestdir
      ls -la
      [the contents of the guestdir should match the contents of the host dir]
      [the owner and group of all files and sub-directories should be the guest's userid]
      echo > hithere
    
  • test it on the Host

    Code: Select all

     cd /home/hostuserid/projects/hostdir
     ls -al 
     [the file 'hithere' should exist]
     [the owner and group of all files should be the host's userid]
    
John
Post Reply