How to share files from Host to Guest in VirtualBox? Host-Ubuntu, Guest-Ubuntu [duplicate]
I have an Ubuntu 12.04 machine on which I have installed VirtualBox with Ubuntu 12.04 as the guest OS.
How can I share files between the host and guest?
I have installed the guest additions also but still it’s not able to mount the sf_shared folders if even it’s mounted. This means I'm unable to retrieve the file from the host.
25 Answers
I do not believe its possible to share files between the host and the guest without installing the extension pack first though I could be wrong on this.
You can find that here:
Check that the version of Virtualbox you have. Mine is 4.2.18 and double click the link
You should see something like this
Click OK and let it install.
Next step create a folder on your host machine as as share area
I've created one called VboxShare in my home directory.
First, make sure that your virtual machine is powered off.
Then, go into settings for your virtual machine, select shared folders then the plus icon to create a shared folder and fill in the details set it to auto mount.
Click OK then start your guest.
Job Done the shared folder appears on you guest machine as
/media/sf_VboxshareThere is only one more step add any user in your guest system that needs access to the folder to the group vboxsf:
sudo adduser $USER vboxsfLog out and back in, everything should work fine now.
4On the VM settings in the Shared folders section, remember the name of your shared forlder!
After installing the VBox Guest additions on the guest OS fire up a terminal and type in
sudo mount -t vboxsf <share-name> /where/to/sharemay wanna check
0Go to Devices option of your VM and click on the Shared Folders option and add the required_folder you want to share.
Now in your file system (root) you can see media/sf_required_folder.
But by default the Guest User won't have access to this folder. So to grant access to this folder you need to add Guest user to the group vboxsf.
For this, sudo adduser Guest_user vboxsf to give access. Now have the access.
If you want to share files and folders you can use Vbox extensions as mentioned in other posts.
Alternatively you can use Nitroshare :
Install Nitroshare (in host and in guest )
sudo add-apt-repository ppa:george-edison55/nitroshare sudo apt-get update sudo apt-get install nitroshareThere are four ways to install Nitroshare - reference : here
Start Nitroshare (in guest and host) from the dash or from a terminal command
nitroshareYou will see the tray icon on top right corner :
By default the destination folder is
~/Desktop. You can modify it in settings.Sending files and folders:
Select _send files/Directory _ from the tray icon, select the file /directory you want to share, click on open.
Then select the VM device from the menu and click OK.
Try this combo. I used this as I am using AMD64 CPU.
virtualbox-4.3_4.3.6-91406~Ubuntu~precise_amd64 with extenstion pack -
Oracle_VM_VirtualBox_Extension_Pack-4.3.6-91406It works. Also Make sure
After installing the VBox Guest additions on the guest OS (VM) fire up a terminal on Guest server and type in
mount -t vboxsf /shared-name /where/to/shareExample
sudo mount -t vboxsf /home/myshare /mntwhere /home/myshare is a folder on Host Server and /mnt is a folder on guest server.
Start dumping files on host folder /home/myshare and see the same on guest /mnt