File sharing from GUEST VirtualBox ( 12.04 ) to HOST ( 10.04 )
Setting up shared folder can be done from Virtual Box as it was further elaborated in answers to these question:
- Error mounting VirtualBox shared folders in an Ubuntu guest
- Mount VirtualBox SharedFolder in Ubuntu VM on boot
However because it is so much easier to set up (and they safer in addition) I usually share folders to and from a virtual machine using basic network shares from the Nautilus right click "Sharing Options" menu. These can be set up anytime and will immediately be accessible from the "Browse Network" entry in Nautilus.
After right click on a directory from your HOME for Sharing Options we may be asked to download samba packages - do so. Then we tick the Share this folder box and give the needed permissions for this share to enable sharing over the network.
We may have to restart our session for changes to take effect. After having defined our shared directory we can browse it using Nautilus Browse Network where our share appears in the Windows Network/WORKGROUP/
directory.
Fo ease of use I have set my network adapter to bridged in the Virtual Box Manager.
Related videos on Youtube
David Marek
Updated on September 18, 2022Comments
-
David Marek over 1 year
I've completed 90% of this walkthrough:
https://help.ubuntu.com/community/VirtualBox/SharedFolders#Getting_VBoxLinuxAdditions.iso
... and I'm currently in the " Prepare Guest " section. Where this is giving me problems:
sudo mount -t vboxsf -o uid=1000,gid=1000 $sharename /mnt/$sharename \
the " -t " option is giving me issues as per this error message when running the full set of commands:
mkdir invalid option --t
Try ' mkdir --help ' for more information.
So! If I've already configured the share on the host ... and I'm attempting to mount a local dir on the GUEST system for the HOST to view
... What should I be doing differently here?
-
Takkat over 11 yearsWhere does the command
mkdir
come in? For shared folders see these questions: askubuntu.com/questions/30396/… askubuntu.com/questions/52328/… -
David Marek over 11 yearsThats kind of what is weird to me ... clearly something is incorrect with the commands listed on the page ... however I'm not sure what
-
David Marek over 11 yearsAlso it seems that this is sharing from the HOST to the GUEST ... I need the HOST to be able to R/W on the GUEST VM
-
-
David Marek over 11 yearsSo I've actually attempted to share via the right click option to no avail. I've run "gksudo nautilus" and enabled the sharing of the /usr/local/ dir with all permissions ... however I'm unable to open that up via the HOST machine. It should be accessible from within nautilus under the "Network" icon right?
-
Takkat over 11 yearsFor security we should only share directories in our HOME. Sharing system directories e.g. in
/usr/..
may lead to unwanted side effects or may even break your system. See edit for shots. -
David Marek over 11 years'net usershare' returned error 255: net usershare add: failed to add share bety. Error was Operation not permitted .... is the error im getting ... and this is between two ubuntu installations
-
Takkat over 11 yearsYou may need to make yourself member of the groups
sambashare
andshareaccess
.