VirtualBox 3.2.6 sharing file with host

Virtual Box is one of the emulator program that can run any os inside an os. Let’s say I installed linux slackware on my machine, but I want to install ubuntu virtually inside my slackware then virtual box is the appropriate program to do it. Or we can use the program for testing some os.

But right now I assume that we already installed virtual box in our linux machine, maybe I will write how to install virtual box someday (it is easy actually, just download it, run the file and that’s it). So the program I have now is how to share the file in slackware data directory into virtual box os machine.

For Example : Ubuntu Jaunty is installed inside virtual box.

First let’s do this in the console command
user@user-laptop:~$VBoxManage sharedfolder add “jaunty” -name “dataku” -hostpath /home/user/shared/folder/VirtualBoxShare/
You may change your dataku with any name you want or exactly like the os installed (mine is jaunty).

Now go to virtual box setting, go to Devices – Shared Folder, Add a directory.
My case is /media/dataku
Then press OK.

user@user-laptop:~$ sudo mkdir /mnt/disini
this directory is for mounting the folder that we want to share. The shared folder is the folder that virtual box will see later.
Now mount the folder
user@user-laptop:~$sudo mount -t vboxsf dataku /mnt/disini

That’s it, now the virtual box is already connected to the host directory.
It’s work for me.
Thanks to Galuh for inspiring me.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.