1

I'm trying to set up a pair of virtual (Win 2008 Server) servers on my laptop for demo'ing Velocity. I've got my first server setup with VirtualBox, but I'm slightly clueless about how to set up the networking so that host and guest can talk to each other. Both guests will also need to be able to talk to each other. The guests don't need to be able to talk to the outside Internet though it may be nice to have.

Do I need a virtual network? How do I set it up?

3 Answers 3

1

Another alternative is to port forward using the default virtual nat network. As long as the host and all running virtuals don't use the same ports you'll be fine.

  • Virtual #1 - db running on port x
  • Virtual #2 - velocity running on port y
  • Virtual #3 - lucene running on port z
  • etc.

Many examples and howto's online, here's the first from a web search

http://sk.c-wd.net/wp/2008/08/17/virtualbox-port-forwarding-with-windows-host/

1
  • Be careful, the NAT mode has some limitations (documented in the manual).
    – wolfgangsz
    Aug 23, 2009 at 17:18
0

The simplest approach would be to set the networking mode to bridged and just let your existing network stack handle everything.

To enable bridged networking, all you need to do is to open the Settings dialog of a virtual machine, go to the “Network” page and select “Bridged network” in the drop down list for the “Attached to” field. Finally, select desired host interface from the list at the bottom of the page, which contains the physical network interfaces of your systems.

3
  • Tried this, but when I select 'Bridged Adapter', I don't get a list of the hosts network adapters, I just get 'Not Selected' in the dropdown, and VirtualBox won't let me save it like this. Have I done something wrong in the initial configuration? Jul 9, 2009 at 9:19
  • What host OS are you running on and what version of VirtualBox?
    – EasyEcho
    Jul 9, 2009 at 11:24
  • Host OS is Win Xp Pro. VirtualBox version is 3.0.0 r49315. Jul 9, 2009 at 13:39
0

I would recommend that you read the manual for VirtualBox, which is excellent in explaining the various options around networking. But essentially, EasyEcho has got it right, you want to set up a bridge and then connect the virtual adapters to the bridge. Each one of them will get it's own IP address from your DHCP server and they will all be able to talk to each other. If you need to be able to use this in a situation where you are not connected to any network, then you will have to manually configure the individual network devices. This will have to be done from inside the Guest OS. In this case just make sure that they are all on the same subnet as the bridge itself (which also needs manual configuration through the Host OS) and have the same subnet mask.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .