No internet access when using VirtualBox

18,594 views
Skip to first unread message

VitoShadow

unread,
Nov 24, 2011, 3:06:23 PM11/24/11
to Android-x86
Hi,
does someone know how can go online when use Android-x86 on VirtualBox?

VitoShadow

unread,
Nov 25, 2011, 5:02:29 AM11/25/11
to Android-x86
If someone knows how can solve this problem, please see also this
question at stackoverflow.com:

http://stackoverflow.com/questions/8227825/android-x86-porting-unable-to-make-it-work

VitoShadow

unread,
Nov 25, 2011, 11:20:09 AM11/25/11
to Android-x86
Problem solved. This answer is by me, from stackoverflow (http://
stackoverflow.com/questions/8227825/android-x86-porting-unable-to-make-
it-work):


In my case, the gateway address was 192.168.0.254 and the DNS server
was 192.168.0.10. I select an IP address for the VirtualBox host from
the unused ones (192.168.0.250).

1) First of all, I set my VirtualBox network configuration:

Attached to: Bridged Adapter

Adapter type: PCnet-FAST III

2) After that, I start Android from VirtualBox; after boot, I open a
root shell, pressing Alt+F1

3) Here, I use these commands:

ifconfig eth0 up 192.168.0.250
route add default gw 192.168.0.254 dev eth0
setprop net.dns1 192.168.0.10

4) Now, I return to Android (Alt + F7), and I can surf on internet!

Unfortunately, this process must be followed each time


On 25 Nov, 11:02, VitoShadow <ragazzom...@hotmail.com> wrote:
> If someone knows how can solve this problem, please see also this
> question at stackoverflow.com:
>

> http://stackoverflow.com/questions/8227825/android-x86-porting-unable...

Nick Rout

unread,
Nov 25, 2011, 4:46:14 PM11/25/11
to andro...@googlegroups.com
On Fri, Nov 25, 2011 at 9:06 AM, VitoShadow <ragaz...@hotmail.com> wrote:
> Hi,
> does someone know how can go online when use Android-x86 on VirtualBox?
>
> --
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-x86...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
>
>

Works for me simply by running the network device as bridged, rather
than the default, which I think is NAT.

Gal

unread,
Nov 26, 2011, 7:26:33 AM11/26/11
to Android-x86
can't make it work, route add default gw...got network unreachableI
tried using the default gateway of the main connection (windows 7
host), ipconfig /all gives:
Windows IP Configuration
   Host Name . . . . . . . . . . . . : Gal-PC   Primary Dns Suffix
 . . . . . . . :    Node Type . . . . . . . . . . . . : Hybrid   IP
Routing Enabled. . . . . . . . : No   WINS Proxy
Enabled. . . . . . . . : No   DNS Suffix Search List. . . . . . :
chello.hu
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . : chello.hu 
 Description . . . . . . . . . . . : Intel(R) 82583V Gigabit Network
Connection   Physical Address. . . . . . . . . : 20-CF-30-6E-DB-A3 
 DHCP Enabled. . . . . . . . . . . : Yes   Autoconfiguration
Enabled . . . . : Yes   Link-local IPv6 Address . . . . . :
fe80::db7:4033:2a3c:794%14(Preferred)    IPv4
Address. . . . . . . . . . . : 192.168.1.107(Preferred)    Subnet
Mask . . . . . . . . . . . : 255.255.255.0   Lease
Obtained. . . . . . . . . . : Saturday, November 26, 2011 12:48:47 PM 
 Lease Expires . . . . . . . . . . : Sunday, November 27, 2011
12:48:47 PM   Default Gateway . . . . . . . . . : 192.168.1.1   DHCP
Server . . . . . . . . . . . : 192.168.1.1   DHCPv6
IAID . . . . . . . . . . . : 287362864   DHCPv6 Client
DUID. . . . . . . . : 00-01-00-01-16-55-E2-51-20-CF-30-6E-DB-A3   DNS
Servers . . . . . . . . . . . : 213.46.246.53                         
             213.46.246.54   NetBIOS over Tcpip. . . . . . . . :
Enabled
Ethernet adapter VirtualBox Host-Only Network:
   Connection-specific DNS Suffix  . :  
 Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet
Adapter   Physical Address. . . . . . . . . : 08-00-27-00-B8-E7   DHCP
Enabled. . . . . . . . . . . : No   Autoconfiguration
Enabled . . . . : Yes   Link-local IPv6 Address . . . . . :
fe80::10f9:db24:ff59:5220%24(Preferred)    Autoconfiguration IPv4
Address. . : 169.254.82.32(Preferred)    Subnet
Mask . . . . . . . . . . . : 255.255.0.0   Default
Gateway . . . . . . . . . :    DHCPv6 IAID . . . . . . . . . . . :
487063591   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-55-
E2-51-20-CF-30-6E-DB-A3   DNS Servers . . . . . . . . . . . :
fec0:0:0:ffff::1%1                                     
 fec0:0:0:ffff::2%1                                     
 fec0:0:0:ffff::3%1   NetBIOS over Tcpip. . . . . . . . : Enabled
there is no default gateway for the VB eth.
thanks

Gal

unread,
Nov 26, 2011, 10:24:29 AM11/26/11
to Android-x86
well, solved it!, there where two things needed to do:
1) change the network settings from 'Public Network" to 'Home
Network' at the 'Network and Sharing Center"
(thanks to thread <a href="http://www.sevenforums.com/network-sharing/
128023-default-gateway-not-available.html">this</a> thread).
2) in ifconfig line needed to add netmask to 255.255.255.0, which is
the default netmask/submask

hope it helps,
Thanks you all,

BTW, really wish there was a way to make it permanent, so I wont have
to run these commands every time I start this...
maybe so bash script in the 'etc' folder?

Chih-Wei Huang

unread,
Nov 26, 2011, 12:25:37 PM11/26/11
to andro...@googlegroups.com
Honeycomb-x86 doesn't support Ethernet (yet).
However, you may add netcfg eth0 dhcp
to your init.rc.

2011/11/26 Gal <gal...@gmail.com>:


> well, solved it!, there where two things needed to do:
> 1) change the network settings from 'Public  Network" to 'Home
> Network' at the 'Network and Sharing Center"
>  (thanks to thread <a href="http://www.sevenforums.com/network-sharing/
> 128023-default-gateway-not-available.html">this</a> thread).
> 2) in ifconfig line needed to add netmask to 255.255.255.0, which is
> the default netmask/submask

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Aaron Johnson

unread,
Jan 8, 2012, 12:07:39 PM1/8/12
to Android-x86
I have this working, actually using a bit different method, just type:

dhcpcd
setprop net.dns1 8.8.8.8

The problem is that I still keep getting 'No internet connection'
messages even though it is connected... I can browse using the android
browser but it still complains about not being connected as soon as I
open the browser, yet it still lets me browse.

This is a problem because other apps do not see that it is connected
either such as the android market which makes it non functional...

Is there a quick fix for this?

On Nov 26 2011, 11:25 am, Chih-Wei Huang <cwhu...@android-x86.org>
wrote:
Reply all
Reply to author
Forward
0 new messages