MacOS – Ways to share folders from Mac host to Mojave guest on VirtualBox (using NFS Manager or other options)

file-sharingmacosmojavevirtualboxvirtualization

I have a Yosemite host and Mojave guest VM via Virtualbox. I want to share the host's folders with the guest. I'm aware there are at least three ways but I haven't been successful with any of them. I'm not an expert and it took a while just to get Mojave as a guest on Yosemite after several failed attempts with Parallels 10. The three ways I'm aware of are:

  1. Guest Aditions: I've installed Guest Additions and I've added directories in the Virtuabox's "Shared Folder" settings. However, I can't seem to find the shared folders in Finder in Mojave – they should just show up under a shared network file no?
  2. NFS Manager (https://www.bresink.com/osx/NFSManager.html)
  3. or setup a Mac server by configuring mac settings via the file sharing section.

Which is the best/easiest way (from the above or from other ways) and is there a video/step-by-step guide about it?

Best Answer

AFAIR the guest additions's sharing feature doesn't work for the macOS varieties. On the other hand none of the mentioned options is necessary to get file sharing running.

The only thing needed is a proper network connection.

The most simple configuration: using the physical NIC of the host as bridged device in the guest. If the physical NIC is already connected to the internet, you don't even have to set up a NAT-network to get internet in the guest.

  1. Shut down the guest
  2. Open the config window of the guest in VirtualBox
  3. Chose network > adaptor 1
  4. Choose Bridge and the appropriate physical NIC of the host (usually en0 or en1) and hit the OK button

Now start the guest machine.

  1. Open System Preferences > Network > bridged NIC on the host and make a note of the network settings (e.g. IP: 192.168.0.2/Mask: 255.255.255.0/Gateway: 192.168.0.1 DNS:192.168.0.1).

  2. Open in the guest: System Preferences > Network > only NIC available which usually has a similar name as the physical NIC of the host (e.g. Ethernet - the interface name (en0, en1, etc.) may differ though).

    Enter a different IP in the same network (e.g. IP 192.168.0.12). The rest stays the same (255.255.255.0/192.168.0.1 DNS:192.168.0.1)

  3. Create a folder to share on the hosting Mac.

  4. On the host switch to System Preferences > Sharing, enable file sharing, hit the +-sign and choose the folder created in the previous step.

  5. In the guest open in the Finder > Go > "Connect to Server..." and connect to the hosting Mac with the proper IP (e.g. smb://192.168.0.2) and credentials.


This common approach didn't work out for the OP for unknown reasons. So things were reversed and a folder in the guest was shared. On the hosting Mac open in the Finder > Go > "Connect to Server..." and choose the IP of the guest (e.g. smb://192.168.0.12) and log-in with the proper credentials.

This worked after adjusting the time of the hosting Mac (it was off for ~8 minutes and Kerberos doesn't like this - server and client time should be in sync; AFAIR 5 minutes difference is acceptable).