Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Ubuntu 12.10 as Host OS and FreeBSD 9 as Guest OS in Virtualbox 4.1.18. I have Samba installed in both Ubuntu and FreeBSD and shared a few folders from virtualbox, also ticking the automount option.

I have also done right click and share in Ubuntu. But when I try to mount in FreeBSD using

mount -t vboxfs sharedfolder /home/user/shared`

it says sharedfolder operation not permitted. I also used

mount_smbfs // /home/user/shared

but I get can't get server address

How to share folder/files between Host Ubuntu and Guest FreeBSD from virtualbox ?

share|improve this question
Do you have any reason for not using NFS? –  peterph Mar 15 '13 at 18:41
NFS ??? How to ? or is it installed by default ? –  Jhilke Dai Mar 18 '13 at 9:55
Network File System should be installed by default and if not, you can install it as any other packages. It is the most prominent network file system for Unices. –  peterph Mar 18 '13 at 17:35

2 Answers 2

up vote 1 down vote accepted


If you want to use VirtualBox builtin share mechanism with vboxsf, you need to install the Guest Additions in the Guest OS (some FreeBSD in your case). Usually this is done via the VirtualBox menu under Devices, there is a shortcut to Install Guest Additions....

However, for FreeBSD you have to do it differently. They have a dedicated documentation for this:

Once the Guest Additions installed, you can use the mount command with the vboxsf filesystem. You need however to share a folder using VirtualBox share folder mechanism, see under VirtualBox's Devices menu the item Share Folders.... Note that the name you will give to the share in this menu will be the name of the "device" you give to mount.


It is also possible to mount either a shared FreeBSD folder or a shared Ubuntu folder with samba. Both ways work. Either case you need to configure a share folder (you mentioned you used the Ubuntu GUI to do that) and then on the other machine you need to mount the share using the correct IP and making sure that both the Guest and Host are on the same network or using port forwarding in case you had NAT configured.

Because there is too many solutions, I am not going to list them all here. Please could you provide more information regarding the network configuration of your Guest OS? What settings did you use when creating the VM? Do you use NAT, Bridge, Host-only or Internal Network?

share|improve this answer
I use NAT, the default network for GuestOS. I tried with mount vboxsf even with su, but no any luck. I have shared folder under virtualbox shared mechanism, settings and Shared Folders and gave name sharedfolders for the ones that I wanted to share. I also used automount option available while sharing using virtualbox. –  Jhilke Dai Mar 18 '13 at 10:14
@JhilkeDai As I said, you can only used the vboxsf and Shared Folder if you have installed the Guest Additions inside the Guest OS, for which I gave you a few links. Did you install them? For Samba, try to use "Bridge" mode, share a folder on the Host (Ubuntu) and try to access it from the Guest (FreeBSD) using smbclient -L <ubuntu hostname>. –  Huygens Mar 18 '13 at 20:22
yes, the Guest Additions were the trick in GuestOS, I never guessed it could be like that, neither I understand how it works. But it works :D –  Jhilke Dai Mar 21 '13 at 14:19
Adding the Guest Additions is like adding a set of new drivers to your Guest virtual machine. For an analogy in non-virtual environment, it is like installing a Graphic card without the drivers, you do not have access to all possibilities. Once you install the drivers you can get all features because the OS is aware of them and offer to make use of them to users. –  Huygens Mar 22 '13 at 7:36

As pointed out at another topic,

Shared Folders for FreeBSD guests are not supported yet [...] There is some draft code and a kernel module for it but it's not working yet.

That is as of Jun 24, 2014.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.