Virtualbox: Mount a shared folder in Guest FreeBSD from Host Ubuntu

user34260

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 //10.0.0.2/sharedfolder /home/user/shared

but I get can't get server address

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

Huygens

Samba

It is 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? I'm going to provide you with one example which assume that your guest is able to view on the network your host (for example, you have one network card defined as host-only).

First share a network folder on Ubuntu as you did. Make sure to create a user account in Samba on the Ubuntu host or that guest access is possible (e.g. sudo smbpasswd -a <username> to give access to a user, replace by the username.

Then on FreeBSD, mount the Ubuntu share by using the correct IP address (10.0.0.2 is probably the one for your NAT "router" created by VirtualBox and therefore it probably won't work), for example either use the Ubuntu IP address on your LAN (e.g. 192.168.1.x) or the one that was defined for the host-only interface. Then your mount_smbfs command will succeed:

mount_smbfs -U <username> //<correct IP>/sharedfolder /home/user/shared

vboxsf

When vboxsf gets supported by FreeBSD (thanks Alexander for pointing that out) and 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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Virtualbox: Mount a shared folder in Guest FreeBSD from Host Ubuntu

From Dev

Create a shared folder between Mac(Host) and Ubuntu(GUEST) on virtualbox

From Dev

VirtualBox Shared Folder Windows 10 Host, Ubuntu Guest

From Dev

VirtualBox: Ubuntu Host and Ubuntu Guest. Where is my shared folder in the Guest?

From Dev

Sharing existing ubuntu folder on host guest with Virtualbox

From Dev

VMWare 10 Windows 8 (host) Ubuntu 14.04 (guest) shared folder won't mount

From Dev

Shared folder shows different permissions between Windows host and Ubuntu guest when using VirtualBox

From Dev

VirtualBox : shared clipboard between Windows 10 host and Ubuntu 18.04 guest

From Dev

Using Samba to share a folder from a Linux guest with a Windows host in VirtualBox

From Dev

Unable to mount a shared folder on VirtualBox?

From Dev

SSH to the Ubuntu host machine from a Ubuntu VirtualBox guest?

From Dev

Virtualbox, ssh from Ubuntu host to Ubuntu guest: connection refused

From Dev

Virtualbox guest additions on Ubuntu host and Manjaro guest

From Dev

How to copy & paste from Ubuntu VirtualBox guest to Windows host?

From Dev

How to copy & paste from Ubuntu VirtualBox guest to Windows host?

From Dev

Troubleshoot VirtualBox Linux Ubuntu guest access from Windows host

From Dev

Connecting to VirtualBox guest (ubuntu) from host (osx) via NAT?

From Dev

Run commands on an Ubuntu guest in VirtualBox VM from Windows host

From Dev

Virtualbox - how to passthrough modem from ubuntu host to windows guest

From Dev

Virtualbox Ubuntu Server, host shared folder... where is it?

From Dev

Unable to mount VirtualBox Guest Additions as a guest (Win7 host)

From Dev

Unable to mount VirtualBox Guest Additions as a guest (Win7 host)

From Dev

VirtualBox shared folder hangs on read in guest OS

From Dev

Shared folder not connecting over Mac VirtualBox guest

From Dev

VirtualBox Guest Shared Folder Ignoring umask

From Dev

Sync Microsoft Onedrive from a guest (Windows 10) to a folder in host (Ubuntu)

From Dev

Can't mount shared folder in Ubuntu 12.10 Server Guest Virtual Box

From Dev

Can't mount shared folder in Ubuntu 12.10 Server Guest Virtual Box

From Dev

How to mount a VirtualBox shared folder at startup?

Related Related

  1. 1

    Virtualbox: Mount a shared folder in Guest FreeBSD from Host Ubuntu

  2. 2

    Create a shared folder between Mac(Host) and Ubuntu(GUEST) on virtualbox

  3. 3

    VirtualBox Shared Folder Windows 10 Host, Ubuntu Guest

  4. 4

    VirtualBox: Ubuntu Host and Ubuntu Guest. Where is my shared folder in the Guest?

  5. 5

    Sharing existing ubuntu folder on host guest with Virtualbox

  6. 6

    VMWare 10 Windows 8 (host) Ubuntu 14.04 (guest) shared folder won't mount

  7. 7

    Shared folder shows different permissions between Windows host and Ubuntu guest when using VirtualBox

  8. 8

    VirtualBox : shared clipboard between Windows 10 host and Ubuntu 18.04 guest

  9. 9

    Using Samba to share a folder from a Linux guest with a Windows host in VirtualBox

  10. 10

    Unable to mount a shared folder on VirtualBox?

  11. 11

    SSH to the Ubuntu host machine from a Ubuntu VirtualBox guest?

  12. 12

    Virtualbox, ssh from Ubuntu host to Ubuntu guest: connection refused

  13. 13

    Virtualbox guest additions on Ubuntu host and Manjaro guest

  14. 14

    How to copy & paste from Ubuntu VirtualBox guest to Windows host?

  15. 15

    How to copy & paste from Ubuntu VirtualBox guest to Windows host?

  16. 16

    Troubleshoot VirtualBox Linux Ubuntu guest access from Windows host

  17. 17

    Connecting to VirtualBox guest (ubuntu) from host (osx) via NAT?

  18. 18

    Run commands on an Ubuntu guest in VirtualBox VM from Windows host

  19. 19

    Virtualbox - how to passthrough modem from ubuntu host to windows guest

  20. 20

    Virtualbox Ubuntu Server, host shared folder... where is it?

  21. 21

    Unable to mount VirtualBox Guest Additions as a guest (Win7 host)

  22. 22

    Unable to mount VirtualBox Guest Additions as a guest (Win7 host)

  23. 23

    VirtualBox shared folder hangs on read in guest OS

  24. 24

    Shared folder not connecting over Mac VirtualBox guest

  25. 25

    VirtualBox Guest Shared Folder Ignoring umask

  26. 26

    Sync Microsoft Onedrive from a guest (Windows 10) to a folder in host (Ubuntu)

  27. 27

    Can't mount shared folder in Ubuntu 12.10 Server Guest Virtual Box

  28. 28

    Can't mount shared folder in Ubuntu 12.10 Server Guest Virtual Box

  29. 29

    How to mount a VirtualBox shared folder at startup?

HotTag

Archive