Getting the Android-x86 emulator networked properly from within VirtualBox has proven to be more of a challenge than I'd anticipated. Fortunately, I've figured out exactly which steps need to be taken in order to successfully get Android-x86 to connect to the Internet from within VirtualBox...
- Make sure the computer that is running VirtualBox has a stable connection to the Internet.
- Open VirtualBox, but do not start Android-x86 yet.
- Select your Android-x86 virtual machine and click Settings.
- Select Networking and ensure Attached to: is set to NAT.
- Click Advanced and make sure your Adapter Type is set to PCnet-FAST III (Am79C973). Mine was set to Intel by default, and this is what kept me from getting connected for so long.
- Click OK.
- Start your Android-x86 emulator.
- Once booted up, hit Alt + F1 to open the Android console.
ifconfig eth0 upand hit enter.
dhcpcd -LK -d eth0and hit enter.
setprop net.dns1 [DNS IP]and hit enter. Replace [DNS IP] with the IP address of your DNS server. This is typically your router's IP address. So, for an average home Linksys router you would type
setprop net.dns1 192.168.1.1and hit enter.
- Press Alt + F7 to return to the Android emulator.
- Browse the Internet!