Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share folders from the host Mac OS to a guest Linux system in VirtualBox [closed]

How do I go about sharing a folder between the host (Mac) and the guest OS (Ubuntu) in Virtual Box?

like image 433
Abhishek Jain Avatar asked May 07 '14 09:05

Abhishek Jain


People also ask

Why can't I access a shared folder from within my VirtualBox machine?

You have to mount your folder on your VM. First you need to install Guest Additions (although I already did this during the installation). Where New is the name of your shared folder. Now you can access the shared folder at ~/new .

How do I transfer files from Mac to virtual machine?

x, select the Share folders on your Mac option. Click the + button. Enter the share name, browse to the folder on the Mac that will be shared with the virtual machine and click Add. Click Apply, then OK.


1 Answers

You’ll need the latest version of VirtualBox (4.3.10) with Guest Additions installed in Ubuntu.

  • With the Virtual Machine powered off and selected in VirtualBox, go to: Machine > Settings ... > Shared Folders
  • For “Folder Path”, click the icon to browse for the folder you want to share.
  • For “Folder Name”, enter a name to describe the share.
  • Click “OK” and start the virtual machine again.
  • Create a mount point which is basically an empty folder.
  • Fire up the terminal and type: sudo mount -t vboxsf folder_name path_to_mount_point folder_name is the name you typed in earlier to describe the share
  • You should be able to browse the shared folder now.

In case of difficulties mounting the same, such as the following error:

mount: wrong fs type, bad option, bad superblock on mydata,    missing codepage or helper program, or other error    (for several filesystems (e.g. nfs, cifs) you might    need a /sbin/mount.<type> helper program)    In some cases useful info is found in syslog - try    dmesg | tail  or so 

perform the following steps:

sudo rm /sbin/mount.vboxsf sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf 
like image 192
Abhishek Jain Avatar answered Sep 19 '22 04:09

Abhishek Jain