To mount a shared folder in a OpenSolaris guest in VirtualBox, you have to install the Guest Additions and then mount the file system type vboxfs. The Usage is:

mount -F vboxfs <share> <mountpoint>

If you want to share the filesystem /share from the host to the guest, then first create the share. Go to “Shared Folders” in the Virtual Machine's Settings and click the little folder with the green plus on the right.
add shared folder icon

Then select the folder to share (/share in the example) and enter a name for the share (share here).

add shared folder dialog

As a result, you will see the folder in the settings:

shared folder settings

Now boot the OpenSolaris, log in and open a Terminal. I assume that you are using the user creates during boot which has the “System Adminitrator” profile. The commands will be executed with the rights given by this profile, so they need to be executes with pfexec.

First, create the mountpoint if it doesn't exist. You will have to do this only once.

pfexec mkdir /share

Now, mount the share.

pfexec mount -F vboxfs share /share

If you want to have the filesystem mounted on every boot, then add this to the file /etc/vfstab. You can do this by executing pfexec vi /etc/vfstab.

share   -   /share  vboxfs  -   yes -

Comments:

I tried using the shared directory in VB and for some reason doesn't understand the command mount -t vboxfs MyShareNTFS /MyShare. The error it returns is unknown type. I was thinking maybe I was using the wrong fs type. I searched google to see if this was know issue. What found out that sharing in VB had/has a of not loading the module vboxvfs sometimes doesn't load and you have to load it manually. I tried that and still nothing. This is in VB 3.0.2.

Posted by RJohnson on August 13, 2009 at 03:47 PM CEST #

As you are using the '-t' option instead of '-F', I guess that you are using Linux as guest. Please note that this entry is about (Open)Solaris as guest.

With Linux, if accessing the share with vboxfs doesn't work, you can try smbfs: mount -t smbfs //vboxsvr/MyShareNTFS /MyShare. Also be careful with uppercase letters.

You must have the guest additions installed for both mounting methods.

Posted by Andreas Huber on August 13, 2009 at 04:27 PM CEST #

Hi, I have a problem, appear:

mount: Operation not applicable FSType VBoxfs

Posted by Cai Aguayo on September 30, 2009 at 04:05 AM CEST #

Please be aware that Solaris is operating case sesnitive. The file system is named "vboxfs", not "VBoxfs".

Posted by Andreas Huber on September 30, 2009 at 07:01 AM CEST #

Hello,

I am trying to configure opensolaris to mount my shares on boot. The exact line in the vfstab is.

Documents - /export/home/universe/Documents vboxfs - yes uid=101,gid=10

The error I'm getting is:
Mount: Mountpoint /export/home/universe/Documents doesn't exist.

Thus the filesystems smf fails and enters maintenance mode, and from there the system fails to reach the default milestone.

Posted by Pryoidain on September 30, 2009 at 06:20 PM CEST #

Please create the mountpoint before mounting with

mkdir -p /export/home/universe/Documents

Filesystems other than ZFS need an existing directory to mount the filesystem. ZFS creates this directory if it doesn't exist, but other (like vboxfs here) doesn't.

Posted by Andreas Huber on September 30, 2009 at 06:36 PM CEST #

Hi,
I have the same problem even being aware the case sensitive.

I recive the message:

mount: Operation not applicable FSType VBoxfs

PD: I did that with Solaris 10 and no problema; but, now, this problem I have is on OpenSolaris.

Rgds.

Posted by Cai Aguayo on October 01, 2009 at 04:50 AM CEST #

Hello again!

Thanks for your quick response last time. I recreated the directories, and I am still having the same boot time mounting issues. I wrote a shell script to test if the problem was with the mount points. Upon logging in as the user "universe" and running the shell script, all mount operations are successful. Here's a line from the script:

pfexec mount -F vboxfs -o uid=101,gid=10 Documents /export/home/universe/Documents

I was wondering if the problem may lie in the order that vfstab is processed. Does it start processing the entries bottom to top, or vice versa? Or am I on the wrong path entirely? :)

Thanks again.

Posted by Pryoidain on October 01, 2009 at 05:35 PM CEST #

Hi Cai,

which command are you trying to execute? Are the VBox Tools installed? Do you have the right (case-sensitive) share name?

Hi Pryoidain,

the filesystems have to be mounted in the right order. If the filesystem on which the directory /export/home/universe/Documents is not mounted, then this directory is not there to be used as mountpoint.

Please be sure to mount the filesystems from root down the tree. Can you mount the vboxfs filesystem by hand?

Regards,
Andreas

Posted by Andreas Huber on October 02, 2009 at 06:55 AM CEST #

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by AndreasHuber