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)