Page 1 of 1
communicating between host & guest
Posted: 8. Sep 2009, 07:03
by neilj
I have installed Kubuntu on WinXP
I am struggling to know how to access the windows hard drive from the Kubuntu virtual drive
I have set up a shared folder in VirtualBox and I have shared the folder in windows but I don't know how to access it
Secondly how can I communicate with a webserver on the guest from a browser on the host?
The host's IP is 192.168.1.100 and and ipconfig tells me that the VirtualBox's IP is 192.168.56.1
However ifconfig on the guest says that IP address is 10.0.2.15
Do I have to somehow set up routing between 192.168.56.1 & 10.0.2.15?
Thanks
Re: communicating between host & guest
Posted: 8. Sep 2009, 09:39
by larky
What is your network settings? NAT?
Choose "bridged" to let your DHCP server assign a IP on the same subnet as your host.
Re: communicating between host & guest
Posted: 8. Sep 2009, 09:51
by neilj
Hi Larky
Sorry to be ignorant here but I am guessing you are asking about the network settings on the guest machine?
And if so how do I find out and change the settings?
Thanks
Neil
Re: communicating between host & guest
Posted: 8. Sep 2009, 09:52
by Sasquatch
That's one possibility to get network going between the Host and Guest. Another option is to add a second NIC to the Guest, attached to Host-Only, then you can access it through 192.168.56.x, where x is the number from the internal DHCP. You can set a static IP too, so you don't have to look for it's IP through ifconfig (though it's easy to guess).
The Shared Folder thing: Open a command prompt (start > run > cmd) and enter net use x: <sharename> -p. With XP as Guest, you can also browse the \\vboxdrv network through Explorer (expand Entire Network, you should see the VB SF network). This only works if you have the Guest additions installed.
Re: communicating between host & guest
Posted: 8. Sep 2009, 10:08
by larky
Turn off virtual machine.
In Virtualbox, highlight your virtual and click settings, the yellow gear.
Choose Network in the left, and in the middle drop down menu, choose "bridged"
Start the virtual.
Re: communicating between host & guest
Posted: 10. Sep 2009, 08:31
by neilj
ok doing good now thanks to all your help
the bridged network is happening with the 2 way communication I wanted
also got the shared folder thing happening
next question is how can I make the shared folder a permanent thing so I don't need to do a mount in a terminal box each time I start it?
Re: communicating between host & guest
Posted: 10. Sep 2009, 09:20
by Sasquatch
That's in my tutorial, check my signature or the Linux Guests.
Re: communicating between host & guest
Posted: 10. Sep 2009, 10:17
by neilj
Thanks Sasquatch
I read your tutorial (
http://forums.virtualbox.org/viewtopic.php?f=3&t=15868)
where it says
If you want to have it mount automatically upon each boot, put the mount command in /etc/rc.local (Debian based distro's), or whatever script is run at the end of the boot process. The Shared Folders service should mount them automatically, but that doesn't always happen.
I put the mount command in /etc/rc.local but it makes no difference.
There is a comment in the file that - In order to enable or disable this script just change the execution bits
but the file already has execute permissions
I am running Kubuntu 9.04
Re: communicating between host & guest
Posted: 10. Sep 2009, 10:27
by Sasquatch
Are you sure you put those mount commands BEFORE the exit 0 statement?
Re: communicating between host & guest
Posted: 10. Sep 2009, 10:29
by neilj
yes
mount -t vboxsf vbhostshare ~/vbhost
exit 0
Re: communicating between host & guest
Posted: 10. Sep 2009, 10:37
by Sasquatch
You can't use ~, it will be mounted in /root and that folder does not exist where you mount it to. I specifically use /home/<username>/share.
Re: communicating between host & guest
Posted: 10. Sep 2009, 11:40
by neilj
Thanks that worked a treat.
I only did the previous based on the example in
http://forums.virtualbox.org/viewtopic.php?f=3&t=15868
sudo mount -t vboxsf share ~/host
appreciate all your help
Re: communicating between host & guest
Posted: 10. Sep 2009, 11:51
by Sasquatch
I'll update the howto. Thanks for spotting this error.