# File sharing with VirtualBox FreeBSD guest



## nickednamed (Nov 1, 2012)

I'm looking for a way to share files between my FreeBSD host and a FreeBSD guest.

So far, I've installed Virtualbox on host according to: FreeBSD Wiki and the FreeBSD Handbook.

I've created, and successfully run a few different VMs already so VirtualBox seems to work as it should. I've installed FreeBSD 9.0 as the guest OS, and it's up and running and nearly configured. I would like to share files between the host and guest and as far as I know, there are three options to do so:

1. VirtualBox shared folders and vboxfs
2. Samba Network shares.
3. NFS sharing

According to a few sources, the first option doesn't work on FreeBSD guests, even with the emulators/virtualbox-ose-additions installed on the guest:

1. The VirtualBox Manual
2. FreeBSD Wiki (vboxfs IS NOT mentioned as one of the features of guest additions).
3. VirtualBox "to do":

I think I can confirm this, because this is all I got:

```
# mount -t vboxfs /MYSHARE /mnt/SHARED
# mount: vboxfs - operation not supported
```
Or something very close to that effect.

So that leaves options 2 and 3. I have experience with neither Samba nor NFS, especially in VirtualBox.

So I have two questions:

1. Is it possible to share files between host and guest using these services?
2. Is there a preferred method / technique for doing so?

Thanks.


----------



## _martin (Nov 1, 2012)

Your point 2) and 3) is just a simple sharing and the same procedure is followed when shares are exported as on non-guested FreeBSD. You can use a host (private) network to keep the traffic isolated. 

To your problem with 1): check the older forum posts, some guys had this problem already here for example. Post is older but seems to be still valid.


----------



## nickednamed (Nov 10, 2012)

Thanks mate. I'm reading up on Samba to get my guest and host sharing files. If it works nicely, I may set up my host to share with the windows boxes in my house.


----------

