Page 1 of 1

VirtualBox fails to start with bridged networking

Posted: 20. Jul 2009, 17:12
by gutzmann
I recently upgraded from lenny/stable to squeeze/testing. With lenny/stable and 2.2.4 there was no probleml. I removed 3.0.2 to give 2.2.4 a try again. 2.2.4 fails with this very error message, too!

I have a bridged setup with 3 identical machines utilizing bridged networking, linux software bridges and tap interfaces. VirtualBox even fails to start when only one machine is involved. Same error message. (tested with 2.2.4 only).

The error message says:
Failed to start the virtual machine Testbed-aFirstTest-vb1. Failed to open/create the internal network 'HostInterfaceNetworking?-vb1_ch0' (VERR_INTNET_INCOMPATIBLE_TRUNK). Unknown error creating VM (VERR_INTNET_INCOMPATIBLE_TRUNK).
The Testbed-aFirstTest-vb0-2009-07-20-16-41-41.log log file (please find it attached to this post) is the result of trying to start a virtual machine with three tap-interfaces (bridged networking) attached to it. Prior to the failed start I executed the following commands in order to setup the tap interfaces, add them to a bridge and force the bridge to form a chain-of-3 network topology:

Code: Select all

    echo Starting tap-interfaces ...
    sudo tunctl -t vb0_ch0 -u dvd
    sudo tunctl -t vb1_ch0 -u dvd
    sudo tunctl -t vb2_ch0 -u dvd
    sudo ifconfig vb0_ch0 0.0.0.0 promisc up
    sudo ifconfig vb1_ch0 0.0.0.0 promisc up
    sudo ifconfig vb2_ch0 0.0.0.0 promisc up
    echo Starting bridge ...
    sudo brctl addbr ch0
    sudo ifconfig ch0 10.0.0.100 netmask 255.255.255.0 broadcast 10.0.0.255 up
    echo Adding interfaces to bridge
    sudo brctl addif ch0 vb0_ch0
    sudo brctl addif ch0 vb1_ch0
    sudo brctl addif ch0 vb2_ch0
    echo Starting visibility procedures ...
    echo Setting default policy of ebtables FORWARD chain to DROP and flushing it ...
    sudo ebtables -P FORWARD DROP
    sudo ebtables -F FORWARD
    echo Ensuring visibility between the vboxes ...
    sudo ebtables -A FORWARD -i vb0_ch0 -o vb1_ch0 -j ACCEPT
    sudo ebtables -A FORWARD -i vb1_ch0 -o vb0_ch0 -j ACCEPT
    sudo ebtables -A FORWARD -i vb1_ch0 -o vb2_ch0 -j ACCEPT
    sudo ebtables -A FORWARD -i vb2_ch0 -o vb1_ch0 -j ACCEPT
Right now, I don't have any clue what the problem *could* be.

Re: VirtualBox fails to start with bridged networking

Posted: 20. Jul 2009, 17:27
by Sasquatch
All I can think off, is that the bridged config changed between 2.2.4 and 3.0.2. Since you downgraded from 3.0.2 to 2.2.4, it's possible that causes the problem. Either upgrade to 3.0.2, or create a new VM, set it to use a bridge and compare it's config file (.xml).

Re: VirtualBox fails to start with bridged networking

Posted: 20. Jul 2009, 18:09
by gutzmann
Sasquatch wrote:All I can think off, is that the bridged config changed between 2.2.4 and 3.0.2. Since you downgraded from 3.0.2 to 2.2.4, it's possible that causes the problem. Either upgrade to 3.0.2, or create a new VM, set it to use a bridge and compare it's config file (.xml).

A newly created vm (with 2.2.4) also fails with the very same error. Tomorrow I'll give 3.0.2 a try again.

Actually I even do not understand what the error message means. Something with the internal switch, but...

Re: VirtualBox fails to start with bridged networking

Posted: 21. Jul 2009, 14:44
by gutzmann
gutzmann wrote:Tomorrow I'll give 3.0.2 a try again.
3.0.2 fails to start, too.

Does someone know what the error

Code: Select all

VERR_INTNET_INCOMPATIBLE_TRUNK
[/b] actually means. The interfaces i use are all created within the same shell-script and should not differ except in the name.

Re: VirtualBox fails to start with bridged networking

Posted: 21. Jul 2009, 18:24
by gutzmann
I finally figured it out. The problem was with the interface names I used.

More specific: There has to be a bug in virtualbox preventing me from choosing perfectly fine names (as far as the linux kernel is concerned) for the tap interfaces. The only restrictions linux places on the interface names length <= 15 characters, so vb0_ch0, vb1_ch0, cb2_ch0 should be perfectly fine as interface names. If i name the tap interface tap0, tap1, tap2 everything works like a charm.

I'll change my bug report http://www.virtualbox.org/ticket/4552 accordingly and maybe a solution could be incorporated somehow into future virtualbox releases.

Cheers,

David