Wednesday Feb 20, 2008

Although Virtual Box provided an option of shared folder, it is not straightforward to use this shared folder. It took me some searches on VirtualBox forum to find it how Ubuntu guest OS can access the shared Folder on WinXP host OS.

1. Add folder(s) to shared folder menu.

 

It is important to write down the folder names at this step. 

 

2. Boot guest system, open a terminal and type in the following commands
 

sudo mkdir /mnt/tao_xp

sudo mount.vboxsf TAO /mnt/tao_xp

The shared folder would be accessible now: read & write!

Reference:

[1] http://forums.virtualbox.org/viewtopic.php?t=3201&highlight=share+folder

[2] http://virtualdebian.blogspot.com/2007/12/sharing-folders-with-virtualbox.html

Comments:

Thank you very much !!!

Posted by NGUYEN Van Tien on June 18, 2008 at 09:15 PM EST #

You have no idea how much of a help you have been. There are a zillion posts on how to do it for Ubuntu as the host os but not for ubuntu as guest os. Thanks a ton!! You are a lifesaver!!

Posted by RB on July 11, 2008 at 11:12 PM EST #

Your a Legend, thanks, simple to the point how-to instructions that worked first time. Not like the help in virtual box.

Cheers!

Posted by MonkeyMan on July 25, 2008 at 02:34 AM EST #

My guest OS is OpenSolaris, it's seems do not support . vbboxsf.:

bash-3.2# mount . vboxsf win_share /mnt/share/
Usage:
mount [-v | -p]
mount [-F FSType] [-V] [current_options] [-o specific_options]
{special | mount_point}
mount [-F FSType] [-V] [current_options] [-o specific_options]
special mount_point
mount -a [-F FSType ] [-V] [current_options] [-o specific_options]
[mount_point ...]

Posted by xue on October 18, 2008 at 01:28 AM EST #

You should remove the spaces between mount, ., and vboxsf. If that still doesn't work, this should work:
mount -t vboxsf win_share /mnt/share

Make sure the name of the folder and the share are not equal, otherwise you get a protocol error

Posted by Martin on November 04, 2008 at 08:44 PM EST #

it still can not work.
Guest OS is OpenSolaris, it's seems do not support . vbboxsf.
Please check virtualbox manual. Share fored do not support on guest OS Opensolaris currently.

Posted by xue on November 05, 2008 at 03:38 PM EST #

have you installed the gues-os additions?
only i noticed i had to have those installed before i could use mount.vboxsf .

Posted by tommie on November 06, 2008 at 05:45 AM EST #

thanks for this, i have the shared folder successfully working. however I would like to have the folder enabled when I start the machine. so I don't have to run the second command every time I want to share a file.

is there some startup file I can edit? and is there a way around the need for an admin password as implied by the sudo?

thanks!

Posted by Richard on November 22, 2008 at 12:56 AM EST #

@Richard: You can see all the startup mounts in /etc/fstab

@Original Post: Thanks for your post. It is indeed very rare to find such a search result with Ubuntu as guest and XP as host. It is very handy! I've don't have the Shared folders working: The mount.vboxfs gives the following error-message: command not found. I also cannot find this command in the repositories... What am I forgetting? Can anybody help?

Posted by Joren on November 30, 2008 at 09:26 AM EST #

Richard: You can see all the startup mounts in /etc/fstab

Original Post: Thanks for your post. It is indeed very rare to find such a search result with Ubuntu as guest and XP as host. It is very handy! I've don't have the Shared folders working: The mount.vboxfs gives the following error-message: command not found. I also cannot find this command in the repositories... What am I forgetting? Can anybody help?

Posted by Joren on November 30, 2008 at 09:27 AM EST #

Brilliant.
Many Thanks.

Posted by Job on January 16, 2009 at 04:39 AM EST #

Thank you VERY MUCH for this. It's strange.. the entire time I was thinking that the host starts up some sort of virtual samba server for the guest.

Again thanks :D

Posted by Mohammed Khoory on February 15, 2009 at 05:39 AM EST #

Hi
I'm kind of new to virtualization and don't know how to set up shared folders...
I have Vista Ultimate as a Host and Ubuntu as guest OS.
I tried exchanging "xp" for "vista" but that doesn't seem to work...
If anybody know how to share the folders I'd be truly gratefull

Posted by Simon on March 27, 2009 at 06:30 AM EST #

I followed your instructions but receive the following error:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Posted by Neil Tomlinson on April 10, 2009 at 11:44 PM EST #

Sorry, I forgot to add; any help would be much appreciated, thanks in advance.

Posted by Neil Tomlinson on April 10, 2009 at 11:45 PM EST #

I figured it out...
I first created a directory as mentioned above using:
cd /media
sudo mkdir shared
and then just this line
Sudo mount -t vboxsf music /media/shared

where "music" is the name of folder specified in Virtualbox and "shared" is the folder you created...
I hop this helps....

Posted by Simon Hanna on April 11, 2009 at 05:02 AM EST #

Awesome. Many thanks.

Posted by Craig Smith on May 06, 2009 at 03:51 PM EST #

THANK YOU !!

GREAT HELP for the starters

Posted by GEORGE BAXTER on May 07, 2009 at 05:58 AM EST #

You forget to tell that you must install Samba on Ubuntu ;)

Posted by anonymous on July 13, 2009 at 05:45 AM EST #

This is great, thanks a lot,

Posted by visitor on July 19, 2009 at 01:17 AM EST #

Thank You,
I am connect my shared folder in virtual box between WinXP host and Linux(RedHat 5.3) guest O/S through his HELP.
Thanks

Posted by Praful T. Dudhatra on August 05, 2009 at 05:53 AM EST #

Perfect Documentation !

Posted by gnuyoga on August 06, 2009 at 02:58 PM EST #

Thanks! wish I found this a few hours ago!!

for google..

access shared folder on windows from linux guest
virtualbox shared folder

Posted by mart on August 14, 2009 at 05:16 AM EST #

All the commands seemed to work, but (being unfamiliar with the Linux system), I am unable to fund anywhere on the virtual desktop to access the shared folder once created in the terminal....

Any help?

Posted by Rob Clarke on August 25, 2009 at 05:05 AM EST #

If you use Linux(redhat,ubantoo) as a guest o/s, first install VBox Guest Additions driver in Linux.
Because, after you install this additions driver, you use "mount.vboxsf" command.
For installation driver mount this "VBoxGuestAdditions_2.0.4.iso" & install "VBoxLinuxAdditions-x86.run" through terminal. It's dependency "gcc & kernel-devel".
(1) Add folder(s) to shared folder menu, share folder name like, "ABC".
** login as a root user -->
(2)open terminal & then fire command "mkdir /mnt/xyz" "mount.vboxsf ABC /mnt/xyz"
** login as a normal user -->
(2)open terminal & then fire command "sudo mkdir /mnt/xyz" & "sudo /sbin/mount.vboxsf ABC /mnt/xyz"

Posted by Praful T. Dudhatra on August 25, 2009 at 04:13 PM EST #

Hi i am getting error like this

You are building on a case-insensitive filesystem.
Please move your source tree to a case-sensitive filesystem.

Is their any solution for this.

Posted by 203.200.13.60 on September 04, 2009 at 07:21 PM EST #

Thank you!

Posted by jason on September 09, 2009 at 01:40 PM EST #

Thanks so much ...

Abdul Mohsin

Posted by Abdul Mohsin on September 13, 2009 at 11:24 AM EST #

Thank you very much!

Posted by Pedro on September 15, 2009 at 05:01 AM EST #

It works definitely. Thanks a lot.

Posted by Sung on September 25, 2009 at 06:32 PM EST #

Perfectly work, good work, easy to follow, thanks

Posted by Martin on October 14, 2009 at 05:20 PM EST #

This is the best post.... 2 lines and you are done.... thanks!

Posted by Sam Dsilva on October 27, 2009 at 05:08 PM EST #

[Trackback] How to share folders between Host and Guest with VirtualBox, on windows and Linux...

Posted by Bits of Wizardry on November 03, 2009 at 05:59 AM EST #

Thank you.
way cool!

Posted by David on November 07, 2009 at 04:44 AM EST #

Thank you so much !

Posted by Bounty on November 10, 2009 at 07:24 AM EST #

[Trackback] How to share folders between Host and Guest with VirtualBox, on windows and Linux...

Posted by Bits of Wizardry on November 13, 2009 at 05:43 AM EST #

i'm so close i can feel it but i'm getting the error

mounting failed with the error: no such device

i think its to do with Vbox, i have guest-os additions installed.

the share name is 'Tom' and the mount point is /mnt/share

the command i'm using is
sudo mount.vboxsf Tom /mnt/share

Posted by much love on November 15, 2009 at 05:55 AM EST #

Post a Comment:
  • HTML Syntax: NOT allowed