any and all help is greatly appreciated in advance.
i'm attempting to simulate a three tier architecture while being disconnected from a corporate network, with the host being the presentation server (php), a virtualized middle biz logic server(soap), and a virtualized data server. all are running ubuntu server. thus, i'm seeking to have two virtual machines running on the host, but bridging off the same network interface.
bridged the middle server vm and have it working well. when i tried to add in a bridge for the 2nd server, under br1, i'm getting a notice that eth0 is already bridged to br0 and can't enslave it to the new br1.
is there any way around this, so that i can bridge two vm's to the same host network interface?
vinaka!
host interface bridging to 2 guests?
-
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
Yes, create two Host Interface and bridge them together. That is all. Put the proper IP address on them and you're done. You can do this while you are still connected to the company network, as your physical interface won't be added to the bridge.
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.
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.
-
OmahaVike1
- Posts: 11
- Joined: 13. Jun 2008, 06:17
thank you Sasquatch. i can't get it to work.
my vm1 is bridged to the host and works great.
i added the bridge to vm2, called br2, to a 2nd nic (linux doesn't like connecting one nic to multiple bridges). get this... the host can ping the bridge ip address and so can the vm2 guest. BUT, the host cannot ping the guest.
totally wild.
so, just to make sure i wasn't losing my mind, i connected the vm2 to br0 (first vm bridge), cleaned out the persistent network files, and it worked. switched it back -- doesn't work.
are there any config files i could share that would help in the analysis of the problem?
thanks once again for your time.
my vm1 is bridged to the host and works great.
i added the bridge to vm2, called br2, to a 2nd nic (linux doesn't like connecting one nic to multiple bridges). get this... the host can ping the bridge ip address and so can the vm2 guest. BUT, the host cannot ping the guest.
totally wild.
so, just to make sure i wasn't losing my mind, i connected the vm2 to br0 (first vm bridge), cleaned out the persistent network files, and it worked. switched it back -- doesn't work.
are there any config files i could share that would help in the analysis of the problem?
thanks once again for your time.
-
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
Try this config, assuming you start with a clean config. All is run with either the root account or using sudo.
Now on the Guests, set the IP addresses of 192.168.3.2 and 192.168.3.3 to their interfaces.
Code: Select all
apt-get install bridge-utils
brctl addbr br0
VBoxAddIF vbox0 omahavike br0
VBoxAddIF vbox1 omahavike br0
brctl addif br0 vbox0
brctl addif br0 vbox1
ifconfig br0 192.168.3.1 netmask 255.255.255.0 upRead 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.
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.
-
OmahaVike1
- Posts: 11
- Joined: 13. Jun 2008, 06:17
sweeeeet. exceptionally well done. thank you so much. i've been banging my head.
for the sake of 'documentation', i would correct your code as such:
The "VBoxAddIF" statements added the vbox0 and 1 to the bridge for me.
thanks so very very much Sasquatch. i really do appreciate the time you've given to this problem.
for the sake of 'documentation', i would correct your code as such:
Code: Select all
apt-get install bridge-utils
brctl addbr br0
VBoxAddIF vbox0 omahavike br0
VBoxAddIF vbox1 omahavike br0
brctl show #just to make sure the interfaces are aligned to the bridge
ifconfig br0 192.168.3.1 netmask 255.255.255.0 up
thanks so very very much Sasquatch. i really do appreciate the time you've given to this problem.
-
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
VBox adds them to the bridge when the Guest is started, not when they are down. At least that is my experience. I also added this exact config to my /etc/network/interfaces file, where I declared vbox0 and vbox1 as separate interfaces, set to manual starting (no auto line) and bridge_port them in the bridge config.
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.
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.
-
OmahaVike1
- Posts: 11
- Joined: 13. Jun 2008, 06:17
TO OTHER READERS: if you've followed the instructions but are still not having luck, here is an alternative...
after solving it today, it worked for a while. upon 2nd host reboot and reiteration of Sasquatch's instructions, it didn't revive itself. i went back through, gutted the settings and started from scratch. no avail.
so i reverted to using the uml-utilities approach found here:
http://www.bluetwanger.de/blog/2007/04/ ... 04-feisty/
towards the end of the instructions, it details how to set up multiple interfaces.
for now, this appears to be more stable than the other approach -- at least for a Hardy Desktop/Hardy server (vm)/Hardy server (vm) approach.
thanks again to Sasquatch. his contributions to this forum (and i've read a few) are extremely valuable.
after solving it today, it worked for a while. upon 2nd host reboot and reiteration of Sasquatch's instructions, it didn't revive itself. i went back through, gutted the settings and started from scratch. no avail.
so i reverted to using the uml-utilities approach found here:
http://www.bluetwanger.de/blog/2007/04/ ... 04-feisty/
towards the end of the instructions, it details how to set up multiple interfaces.
for now, this appears to be more stable than the other approach -- at least for a Hardy Desktop/Hardy server (vm)/Hardy server (vm) approach.
thanks again to Sasquatch. his contributions to this forum (and i've read a few) are extremely valuable.
-
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
Additional info, for more help
.
Code: Select all
#/etc/network/interfaces
auto brdg
iface brdg inet static
bridge_maxwait 0
bridge_ports lan vbox0 vbox1
address 192.168.0.1
netmask 255.255.255.0
# remove the address and netmask and change static to dhcp
# if you use DHCP configuration
#auto lan
iface lan inet manual
#auto vbox0
iface vbox0 inet manual
#auto vbox1
iface vbox1 inet manualRead 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.
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.