Access virtualbox Linux guest from windows host and access windows host share folder from virtualbox Linux guest

I have to do a lot of googling every time installing virtualbox. So I’d better summarize the process here for future reference.
The situation:
Installed Linux guest in Virtualbox on Windows 7 host.
The goal:
Windows 7 (the host) can access the Linux (the guest) and the guest and access the host as well.
The way:
(1) Create a shared folder in Virtualbox and call it D_DRIVE
(2) add mount.vboxsf D_DRIVE /home/junwei/D_Drive to the first line of /etc/rc.local
(3) sudo reboot
Now the guest Linux can access files on the host Windows via D_Drive.
(4) install samba on the guest Linux
“Ubuntu Software Center”->search samba->install it
(5) In Samba Server Configuration, add share. For example, I share /home/junwei
(6) sudo poweroff
(7) In Virtualbox, use two network adapter, one is NAT to allow the guest Linux to access Internet, one is “host-only” for Samba.
(8) power up the guest Linux
(9) On Windows host network, look for the name of the Virtual Linux machine. Double click it and provide the name and the password. There you go!

The benefit of doing the above is
(a) calculation results on Linux can be directly accessed from Windows software without copying to the Linux mounted shared folder.
(b) calculation results on Windows can be directly accessed from Linux software without copying to the Windows network shared folder.

Linux_Windows


Enjoy Lindows/Winux programming!

One thought on “Access virtualbox Linux guest from windows host and access windows host share folder from virtualbox Linux guest

  1. This is very interesting, You’re a very skielld blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your website in my social networks!

Leave a Reply

Your email address will not be published. Required fields are marked *