VirtualBox Interface Sharing Part 2

2:32 am Vm Desktop, VM, Gentoo, Linux

VirtualBoxWell I hit a little snag when I decided to boot two systems at one time so had to solve that problem.

Not really that hard, but here is the difference.

You need to bring up a tap interface for each of the systems and then you need to assign a bridge to the systems. This is not a big deal, and also lets you set up systems easily for bridging, but I need to look in to that more and do testing as I need it.

For now here is the way to fix it and the config file for /etc/conf.d/net


#Vboxp0 Interface
tuntap_vboxp0=”tap”
tunctl_vboxp0=”-u <username>”
config_vboxp0=( “null” )

#Vboxp1 Interface
tuntap_vboxp1=”tap”
tunctl_vboxp1=”-u <username>”
config_vboxp1=( “null” )

# Bridge Interfaces Together For Private Networking
brctl_vboxbr0=”setfd 0″
bridge_vboxbr0=”vboxp0 vboxp1″
depend_vboxbr0( ) {
need net.vboxp0
need net.vboxp1
}
config_vboxbr0=( “10.10.10.1/24″ )

So the important lines here is the depend line as I figured out you no longer need to bring up interfaces manually when you can do it as part of the bridge.

Now to make sure the whole contraption comes up correctly add the following to the starup scriptsrc-update add net.vboxbr0 default

That is all folks for the bridge.

In terms of virtualbox, you basically need a tap interface per virtual machine (example: vboxp0) so I have the bridge with two virtual box machines. You can add more virtual systems if you want but you will need a tap interface per machine added and also Mega memory!

Hope this helps!

Note: If you figure out how to do this better please let me know!


Site Search Tags: , , , , , , , , , , ,
Copyright (c) by BlueKnight

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.