Network connectivity problems with VirtualBox - but only when using bridged interfaces

Hi All,

I’m hoping for some useful suggestion on how to troubleshot these problems on VirtualBox:

  • No VM is able to reach the VBOx host and
  • No VM can reach any other VMs
  • No VMs can be reached from the VBox host

By “reach” I mean: no ping or any TCP connection.
Also: this problem only occurs when the VM network interfaces are in Bridged mode. When using e.g. NAT or internal network, there is no problem at all.

The network adapters of the VMs are connected to the VBox host’s virb0 bridge adapter:

             |
VBox Host    |   VM1(win2008r2)      VM2(win7)        VM3(sles11sp2)
  [virbr0]   |      [net0]             [net0]            [eth0]
      |      |         |                 |                  |
      +----------------+-----------------+------------------'
             |
  [eth0]     |
             |
  [wlan0]    |
             |

However: strangely enough, dnsmasq (running on the VBox host’s virbr0 adapter) is seeing DHCPDISCOVER requests coming in on the bridge interface and sends DHCPOFFERS:

Jan 8 00:20:48 dnsmasq-dhcp[28385]: DHCPDISCOVER(virbr0) 08:00:27:e2:25:11
Jan 8 00:20:48 dnsmasq-dhcp[28385]: DHCPOFFER(virbr0) 192.168.110.136 08:00:27:e2:25:11

Those DHCPOFFERs are not seen by the VMs, since all of them remain unconnected.

I’m currently running VirtualBox 4.2.6 (vanilla download from http://dlc.sun.com.edgesuite.net/virtualbox/4.2.6/VirtualBox-4.2-4.2.6_82870_openSUSE114-1.x86_64.rpm)
on openSUSE 12.2. But I had the same issue on 2 earlier versions of VBox and on
openSUSE 12.1.

Some diagnostics:

  • the vboxdrv service is running, but:
# /etc/init.d/vboxdrv status
  redrecting to systemctl
  vboxdrv.service - LSB: VirtualBox Linux kernel module
          Loaded: loaded (/etc/init.d/vboxdrv)
          Active: active (exited) since Tue, 08 Jan 2013 00:35:10 +0100; 10min ago
          CGroup: name=systemd:/system/vboxdrv.service

I’ve tried to restart this service, but that’s all it is giving me… Btw, when restarting, this is what I see in /var/log/messages:

# /etc/init.d/vboxdrv restart
  redirecting to systemctl
  Jan  8 00:48:19 lupus vboxdrv[1114]: Stopping VirtualBox kernel modules..failed
  Jan  8 00:48:19 lupus vboxdrv[1114]: (Cannot unload module vboxnetflt)
  Jan  8 00:48:19 lupus kernel: [97673.171219] vboxpci: IOMMU not found (not registered)
  Jan  8 00:48:19 lupus vboxdrv[1143]: Starting VirtualBox kernel modules..done

Is this the problem here? How to solve it?

Btw: these VirtualBox processes are running:

# ps -ef|grep -i vbox
root     23967  9298  0 13:11 pts/2    00:00:00 grep --color=auto -i vbox
root     31932     1  0 Jan07 ?        00:00:16 /usr/lib/virtualbox/VBoxXPCOMIPCD
root     31938     1  0 Jan07 ?        00:00:37 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
  • Vbox modules:
# lsmod | grep -i vbox
  vboxpci                27253  0 
  vboxnetadp             25670  0 
  vboxnetflt             23442  2 
  vboxdrv               336800  5 vboxpci,vboxnetadp,vboxnetflt
  • bridge:
# brctl show
  bridge name     bridge id               STP enabled     interfaces
  virbr0          8000.0021cc634e9a       no              eth0
  • routes:
# route -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
  192.168.110.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
  192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan
  • finally, no firewall rules are active:
  # iptables -L
  Chain INPUT (policy ACCEPT)
  target     prot opt source               destination          
  
  Chain FORWARD (policy ACCEPT)
  target     prot opt source               destination         
  
  Chain OUTPUT (policy ACCEPT)
  target     prot opt source               destination

Thanks,
Gábor

When I only want a VB VM to have access to the Internet, I choose the NAT
method. For the most part, I choose this method for Windows XP guests.

When I want the VM to be like any other machine on my network, I choose bridging
using the “Intel PRO/1000MT Desktop (bridged adapter, eth0)”. Those are all for
openSUSE or other Linux guests. My most-heavily used guest is a 32-bit version
of openSUSE 12.2. I rarely use it from the console of its host machine as I
generally use ssh to contact it.

I am also using the 4.2.6 RPM downloaded from the VirtualBox site on x86_64
hosts running 12.1 or 12.2. For me, it just works.

I have no idea why the ‘route -n’ output you posted shows a virbr0 interface.
Neither my guest nor host show anything like that. In fact, the routing table
for both is identical and shows


finger@linux-nh9e:~> /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
finger@linux-nh9e:~>

As your output shows wlan0 as the connection to the gateway, I expect that you
have posted the table for the host. What does the guest show?

One thing: Notice how I posted the actual command I used, the response from the
system, and the next prompt? You should do the same.