communicating between host & guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

communicating between host & guest

Post 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
larky
Posts: 3
Joined: 8. Sep 2009, 07:25
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: winxp, ubntu64

Re: communicating between host & guest

Post 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.
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

Re: communicating between host & guest

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: communicating between host & guest

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
larky
Posts: 3
Joined: 8. Sep 2009, 07:25
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: winxp, ubntu64

Re: communicating between host & guest

Post 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.
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

Re: communicating between host & guest

Post 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?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: communicating between host & guest

Post by Sasquatch »

That's in my tutorial, check my signature or the Linux Guests.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

Re: communicating between host & guest

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: communicating between host & guest

Post by Sasquatch »

Are you sure you put those mount commands BEFORE the exit 0 statement?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

Re: communicating between host & guest

Post by neilj »

yes
mount -t vboxsf vbhostshare ~/vbhost

exit 0
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: communicating between host & guest

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
neilj
Posts: 12
Joined: 6. Sep 2009, 09:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, WinXP

Re: communicating between host & guest

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: communicating between host & guest

Post by Sasquatch »

I'll update the howto. Thanks for spotting this error.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply