I followed the steps for sharing folders between Windows 7 and Ubuntu in VirtualBox.
Despite that the folder appears with a X sign and gives me the following message when a try to open it:
The folder content could not be displayed
When I choose Shared Folder
from the VirtualBox Device
menu, the following warning is displayed:
On the system page, you have assigned more than 50% of your computer's memory (2.93 GB) to the virtual machine...
How can I successfully share folders between Windows and Ubuntu using VirtualBox?
Access to shared folders in Virtual Box
Command line
By default, VirtualBox shared folders are created with read/write permission for the guest. This can be done from the command line on the host with:
By adding the option
--readonly
we can restrict these for read-only access. Use the--transient
option if you only want the shares to appear in the present session but not persistent for following sessions. There are some limitations for shared folders (see this question for details). If prerequisites are met we may mount these shared folders manually by running the following commands in the guest:Of course, we can also use different mount options to mount as read/only or mount with read access only to root.
Auto-Mount through Virtual Box Manager
In case we enabled auto-mounting on creating a shared folder from the Virtual Box Manager those shared folders will automatically be mounted in the guest with mount point
/media/sf_<name_of_folder>
. To have access to these folders users in the guest need to be a member of the groupvboxsf
.The guest will need to restart to have the new group added.
Source and further reading: Virtual Box User Manual
Actually there is an easy way to do that:
/media
or press Left Control+DReboot
Try to access
/media/sf_your_shared_folder_name
. If you still don't have access, that means you don't belong to thevboxsf
group. Run this command in the virtual machine:Log out and log in again to apply changes of
adduser
. If you still can not access the folder, try rebooting.If you still can not see the shared folder, you have to mount it. You can activate automount for the shared folder in the options of VirtualBox Manager.
Restart again.
First, please make sure you have installed the Guest Additions
Start your VM
Devices > Insert Guest Additions CD image...
Mount the CD:
Install the necessary packages:
Install:
Second, add your user to the group 'vboxsf':
Reboot
Know that the label of your shared folder is
lpi
(for example):Prepend
sf_
to the label. Then, you will find your shared folder under/media/sf_lpi
Finally, you can also create a link to your home. For example:
:)
Add the shared folder to the virtual machine using vBox graphical interface Make sure to select automount and make permanent
Login to the virtual machine using a root account
Check vboxsf group exists
Check user is not already in vboxsf group
Add user nilo to vboxsf group
Check again user groups
Reboot and login as nilo
Shared folder is now accesible in
/media/sf_dropbox
(dropbox is the name I gave to the share)Share a folder between Host OS-> Windows and Guest OS ->Ubuntu(Virtual box)
Step 1 Install install Guest Additions from VirtualBox’s menu go to Devices->Install Guest Additions This will mount a virtual CD on your /media/cdrom. As root user Open this /media/cdrom added folder using Open with terminal option(Right click with mouse).
Step 2 Run the program VBoxLinuxAdditions.run. When the program completes reboot your VirtualBox.
Step 3 Create a shared folder. From Virtual menu go to Devices->Shared Folders then add a new folder in the list, this folder should be the one in windows which you want to share with Ubuntu(Guest OS). Make this created folder auto-mount. Example -> Make a folder on Desktop with name Ubuntushare and add this folder.
Step 4 When done with you shared folder(s) specification, we mount folder from Ubuntu(Guest OS). Create a mountpoint, this a directory in Ubuntu that will share files with the shared folder from Windows. Run this to create a directory in Ubuntu
Step 5 With your mountpoint created you can now mount the shared folder. Run this command to share the folder:
Ubuntushare is the name of folder we add in VirtualBox Devices section this folder is in Windows(Host OS). ~/Desktop/windowsshare is the directory in Ubuntu(Guest OS)
CONGRATULATIONS-> Now you can share the files between Windows and Ubuntu. Try adding any file in windows(Host OS) Ubuntu share folder now check Ubuntu(Guest OS) windowsshare directory the file will be reflected.
My Article
Shared folder b/w windows and ubuntu
As of now (version 6.0.10 of VirtualBox) there are
make permanent
andauto-mount
options for shared folder, alsomount point
(At
) in GUI of virtualbox. For me the following worked:sudo apt-get install virtualbox-guest-utils
Folder on mount point specified in GUI was created automatically and
ls
showed files located on host Windows PC.Late to the party, but here is the solution that worked well for me:
Make sure that you have Guest Additions installed
linux-headers
,build-essential
,gcc
,make
...Add Shared folder
After adding a shared folder, your folder appears in your VM as
sf_<folder_name>
root
userGive permissions to the shared folder. Open terminal (Ctrl+Alt+T) and enter these commands:
<username>
- your user name,<folder_name>
- shared folder namevboxsf
groupRestart your VM
Create a dir where you're going to mount this, like
mkdir docs
Install Guest Additions into the guest Ubuntu machine.
Shutdown the Ubuntu guest, then configure it.
In Storage, setup your shared folder and make a note of what you set as the name in the second field. For example "crazy". Check the box for Auto-Mount.
Boot the Ubuntu guest.
Like you said, it won't actually be accessible. (This is the key part of your question.) You'll find instead it is present at
/media/sf_crazy
, where 'crazy' is the name you gave it. And, it will also be present in your home dir at~/crazy
.You now need to take one more step to actually mount it:
Perform these steps after installing Guest Additions. For Windows 10 host environment, on the Windows machine I had to share folders.
where xxxxxx is your user account name. Log out and log back in to Ubuntu.