Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 its not able to mount the sf_shared folders,if even its mounted. This means I'm unable to retrieve the file from the host. can tell me how to do it.

share|improve this question
1  
possible duplicate of Sharing between Host and Guest in Virtualbox –  Eric Carvalho Oct 27 '13 at 15:59
    
also see: askubuntu.com/questions/30396/… - but I recommend to use Ubuntu's inbuilt file sharing through the virtual network. –  Takkat Oct 27 '13 at 19:22

4 Answers 4

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: https://www.virtualbox.org/wiki/Downloads

Check that the version of Virtualbox you have. Mine is 4.2.18 and double click the link

You should see something like this

enter image description here

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.

enter image description here

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.

enter image description here

Click OK then start your guest.

Job Done the shared folder appears on you guest machine as

/media/sf_Vboxshare

enter image description here

There 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 vboxsf

Log out and back in, everything should work fine now.

share|improve this answer
    
@Richard: can you explain your comment? Are you saying sudo adduser $USER vboxsf doesn't work or that sudo useradd -g $USER vboxsf is somehow preferable? –  User Dec 1 at 5:53

On 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/share

may wanna check https://forums.virtualbox.org/viewtopic.php?f=3&t=15868

share|improve this answer

Go 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.

share|improve this answer

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-91406

It 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/share

Example

sudo mount -t vboxsf /home/myshare /mnt

where /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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.