Page 1 of 1

Virtualbox 2.0.2 Host Interface Network on Ubuntu 8.0.4

Posted: 23. Sep 2008, 18:12
by jwolach
I recently installed Virtualbox 2.0.2 on my Ubuntu 8.0.4 computer. I configured Host Interface Network according to the on-line help docs. Everything worked just fine until I rebooted my computer.

When I logged into Ubuntu after the reboot, my Wired Ethernet connection stopped working. I took out the entries I put in for the bridge controller from my /etc/interfaces file and the connection was restored. Unfortunately, I can't use HIF anymore.

Has anyone experienced this?

Thanks...

Posted: 23. Sep 2008, 20:08
by Sasquatch
I've seen it a couple of times here on the forum. When you create a bridge, you have to make sure that the physical connection is no longer getting an IP. Once you set that straight in your /etc/network/interfaces file, it should be ok. However, reports have been that Network Manager (the applet in the systemtray) can cause some problems with the connection as it can't seem to handle a bridge properly. Solution for that is to remove NM-applet and associated packages. You can manange you network from the interfaces file anyway.

Posted: 23. Sep 2008, 20:40
by jwolach
Thanks Sasquatch for the info. I have also read a couple of posts about creating Start and Stop scripts to have Virtualbox execute when the VM gets launched and shutdown. However, I can seem to get them to work. Do you have any of these scripts that work?

Thanks..

Posted: 23. Sep 2008, 20:48
by Sasquatch
I don't need scripts, as everything works just fine for me.

You could try something like the following:

Code: Select all

## script for starting the vm
ifconfig eth0 0.0.0.0 #change eth0 to your physical wired connection)
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 vbox0
#if you use static addresses use the following line
ifconfig br0 <your static IP configuration>
#else, run dhclient for a DHCP address
dhclient br0

Code: Select all

## script for shutdown vm
brctl delif br0 vbox0
brctl delif br0 eth0
brctl delbr br0
#static address use this
ifconfig <static address info>
#DHCP config
dhclient eth0

Posted: 23. Sep 2008, 20:54
by jwolach
I just tried to run the scripts you sent and got this error. This is same error I got when I tried the other similar scripts.

----------------
Failed to initialize Host Interface Networking.
VBox status code: -3100 (VERR_HOSTIF_INIT_FAILED).

Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}
-----------------

What am I doing wrong?

Posted: 23. Sep 2008, 23:28
by jwolach
Sasquatch,

I went ahead and took your advice and disabled the nm-applet and just created a Permanent Host Interface like in the helps docs. Everything worked great until I reboot. When I rebooted the machine I seemed to have lost my Internet connection. My eth0 & br0 have the same IP address and I can ping other devices on my network. I just can't get out to the Internet.

Can you suggest what I might be doing wrong?

Thanks...

Posted: 24. Sep 2008, 12:24
by jwolach
It looks like I was able to fix my problem. I had to go into my network settings are take my NIC out of Roaming Mode and put in specific DNS IP addresses. It looks like Ubuntu defaulted to my router's IP for DNS.

Thanks