vboxsf
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.
Samba
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?