Results 1 to 5 of 5

Thread: Automounting of VirtualBox shared folder not working in openSUSE 12.2

  1. #1

    Default Automounting of VirtualBox shared folder not working in openSUSE 12.2

    I have openSUSE 12.2 in VirtualBox and I tried adding the mount command in /etc/fstab but it doesn't mount the folder on startup. The command DOES work if i run it with sudo in a terminal.

    Host OS: openSUSE 12.1
    Guest OS: openSUSE 12.2
    VirtualBox: Oracle 4.1.12.x

    Command that works in terminal:
    Code:
    sudo mount -t vboxsf mysite /srv/www/mysite
    Command that does NOT work in /etc/fstab (I have it at the end of fstab and added it using "vi"):
    Code:
    mount -t vboxsf mysite /srv/www/mysite
    Any idea what I'm doing wrong?

  2. #2
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: Automounting of VirtualBox shared folder not working in openSUSE 12.2

    Did you know there's a forum for virtualization? Anyway, the fstab entry for mounting a shared folder on boot will look something like


    Code:
    sharename   mountpoint   vboxsf   defaults  0   0

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Automounting of VirtualBox shared folder not working in openSUSE 12.2

    Quote Originally Posted by 6tr6tr View Post
    I have openSUSE 12.2 in VirtualBox and I tried adding the mount command in /etc/fstab but it doesn't mount the folder on startup. The command DOES work if i run it with sudo in a terminal.

    Host OS: openSUSE 12.1
    Guest OS: openSUSE 12.2
    VirtualBox: Oracle 4.1.12.x

    Command that works in terminal:
    Code:
    sudo mount -t vboxsf mysite /srv/www/mysite
    Command that does NOT work in /etc/fstab (I have it at the end of fstab and added it using "vi"):
    Code:
    mount -t vboxsf mysite /srv/www/mysite
    Any idea what I'm doing wrong?
    So I have a two part solution I use:

    1) I activate the after.local bash script per my instructions here in the openSUSE 12.x guest:

    systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums

    2) Next, for each folder I want to share, I must add the folder name to my VirtualBox configuration and I normally allow a read/write ability. Then, in the after.local file in the guest I add, per shared folder:

    Code:
    if [ ! -d /folder_name ] ; then
      mkdir /folder_name
    fi
    mount -t vboxsf folder_name /folder_name -o defaults
    I do this for each folder I want to share and it works great. I keep an example external in the host and just copy/paste over the info after the guest is up and running.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4

    Default Re: Automounting of VirtualBox shared folder not working in openSUSE 12.2

    Quote Originally Posted by jdmcdaniel3 View Post
    So I have a two part solution I use:

    1) I activate the after.local bash script per my instructions here in the openSUSE 12.x guest:

    systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums

    2) Next, for each folder I want to share, I must add the folder name to my VirtualBox configuration and I normally allow a read/write ability. Then, in the after.local file in the guest I add, per shared folder:

    Code:
    if [ ! -d /folder_name ] ; then
      mkdir /folder_name
    fi
    mount -t vboxsf folder_name /folder_name -o defaults
    I do this for each folder I want to share and it works great. I keep an example external in the host and just copy/paste over the info after the guest is up and running.

    Thank You,
    What's the benefit of this over using fstab? I see the benefit for wanting to create new folder if it doesn't exist, but since I already created it, isn't it just easier to put the one line in fstab? (I might be missing something)

  5. #5

    Default Re: Automounting of VirtualBox shared folder not working in openSUSE 12.2

    Quote Originally Posted by chief_sealth View Post
    Did you know there's a forum for virtualization? Anyway, the fstab entry for mounting a shared folder on boot will look something like


    Code:
    sharename   mountpoint   vboxsf   defaults  0   0
    Thanks this worked!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •