What I want:
I want a virtual machine guest running Ubuntu (on VirtualBox) for various web development test servers (running on different ports, e.g. Grunt.js is running on port 9000).
- I want to test web applications running on these servers a) from
within the guest b) from within the host (running Windows 7, btw), c)
from other devices in the same network, connected via WiFi (e.g.,
- I want to be able to access the Internet from within the guest
I was first running a solution where I had both a NAT and a Host-only adapter configured in VirtualBox, which was fine for accessing the guest from the host and for accessing the Internet from within the guest.
Now that I want other devices to be able to access the virtual machine, this solution doesn't work anymore. I was able to do this years ago with a bridged network adapter, but that doesn't seem to work here.
What I did:
I set up bridged networking as the only network adapter in VirtualBox and left the default settings. When I boot up the guest, the WiFi symbol in the upper right keeps flashing, i.e., the arrows don't show up. After a while it says: "Disconnected - you are now offline".
This is the output of
eth0 Link encap:Ethernet HWaddr 08:00:27:71:92:9c inet6 addr: fe80::a00:27ff:fe71:929c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:233 errors:0 dropped:0 overruns:0 frame:0 TX packets:103 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16083 (16.0 KB) TX bytes:22280 (22.2 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2624 (2.6 KB) TX bytes:2624 (2.6 KB)
As you can see, no inet4 address. I thus cannot ping the host from within the guest and vice versa.
I also tried this, i.e. I changed the MAC address and ran
sudo rm -rf /etc/udev/rules.d/70-persistent-net.rules sudo reboot
Didn't change anything at all.
What else can I do to debug this? I suspect it's a DHCP problem. I can easily get an IP on my host and other machines in the network, but not on the guest.