Menu Close

How to mount a Sun VirtualBox Shared Folder on Ubuntu/Solaris Guest OS

Sun VirtualBox is a popular, easy-to-use, free Virtualization software. I use it on 64-bit Windows Vista Ultimate (host OS) to virtualize Solaris10 and a few other Linux distributions. A frequent requirement is to share files and directories between the host OS and guest OSes. Sun VirtualBox makes this sharing easy with the "Shared Folders" feature. Given below are steps I followed to permanently share a directory on my host OS (Windows Vista) with Ubuntu 9.04 (guest OS) on Sun VirtualBox 3.04:

STEP 1: Configure the Shared Folder on the Sun VirtualBox GUI.

Select the Virtual Machine (Ubuntu 9.04) and click "Shared Folders" in the "Details" tab on the right pane. You will see the following window pop-up:

vboxsf

Click the “Add shared folder” icon, select a name for your shared folder, the path to the actual folder on your host OS and the access level for the folder.

I configured the following:

For Ubuntu 9.04 Guest OS:

Name = Ubuntu9.04

Path = E:\VirtualMachines\Ubuntu9.04

Access = Full

For Solaris 10 Guest OS:

Name = Solaris10

Path = E:\VirtualMachines\Solaris10

Access = Full

 

STEP 2: Mount the Shared Folder

For Ubuntu 9.04 Guest OS:

Temporary Mountpoint(disappears after rebooting Guest OS)

Start the Ubuntu 9.04 Virtual Machine, open a terminal window and enter the following command:

sudo mount -t vboxsf Ubuntu9.04 /whatever-you-want

Permanent Mountpoint (remains after rebooting Guest OS)

Start the Ubuntu 9.04 Virtual Machine, open a terminal window and add the following line to the /etc/fstab file:

Ubuntu9.04      /whatever-you-want  vboxsf    rw 0       0

Restart the Ubuntu 9.04 Guest OS.

 

For Solaris 10 Guest OS:

Temporary Mountpoint(disappears after rebooting Guest OS)

Start the Solaris 10 Virtual Machine, open a terminal window and enter the following command as the root user:

pfexec mount -F vboxsf Solaris10 /whatever-you-want

Permanent Mountpoint (remains after rebooting Guest OS)

Start the Solaris 10 Virtual Machine, open a terminal window and add the following line to the /etc/vfstab file:

Solaris10       - /mrkips_vista   vboxfs - yes -

Restart the Solaris 10 Guest OS.

 

References:

UNIX manual (man mount, man fstab)

VN:F [1.9.22_1171]
Rating: +3 (from 7 votes)
Print Friendly, PDF & Email
(Visited 15 times, 1 visits today)

5 Comments

  1. vincent

    have you tried that?
    I don’t think this can work on solaris.

    I suspect how do you make it work on solaris ” mount -F vboxsf Solaris10 /whatever-you-want”

  2. mrkips

    @Vincent: Yes, I have tried it. The how-to and solution articles on my blog are tried and tested. Basically, I just share my experiences. So, it definitely worked for me.

  3. Avvocato

    @Vincent To get it to work, type vboxfs as the file system type (instead of vboxsf).
    Thanks for sharing mrkips.

  4. mrkips

    @Dindi: By /whatever-you-want, I mean any location on Ubuntu where you wish to mount the shared windows folder. Note that the location must exist. For .e.g. you may create a directory /myWinDir and mount the shared folder (Ubuntu9.04) as follows:

    sudo mount -t vboxsf Ubuntu9.04 /myWinDir

    NOTE: Ubuntu9.04 is just an alias for the windows folder E:\VirtualMachines\Ubuntu9.04 in the example

Leave a Reply

Your email address will not be published. Required fields are marked *