networking - How to setup Android on VirtualBox with host-only adapter

08
2014-07
  • Sean Lee

    I am trying to setup a test environment of 2 VBox OS, one with Ubuntu, the other with Android KitKat. With Ubuntu, setting up NAT and host-only adapter is a breeze.

    However, with Android, I tried 2 methods as follow:

    1. First try, install KitKat with 2 adapters (Host and Host-Only Adapter) setup by default. Result is no internet connection at all.
    2. Second try, install KitKat with only NAT adapter setup by default. Result is blank screen.
    3. Third try, install KitKat with no network adapter, when installation complete, activate NAT adapter, then internet works, but pointer failed to appear. Also, not sure how to setup Host-Only Adapter from here.

    I want to have this client/server setup to test server and client setup for android.

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    VirtualBox networking problem, host XP, guest Debian
  • Questioner

    I'm trying to set up a development environment in a virtual machine on my laptop, with debian os. I have both lan and wlan available on the host machine, yet I can't connect to the internet using either.

    As I said the host OS is windows XP and the guest OS will be the latest Debian, we downloaded the business card net install so we need internet access from the beginning, besides we need the virtual machine to be visible on the local network (for my fellow developers).

    We tried host-only networking, NAT, bridging, with proxy (the local network uses a proxy to connect to the internet) and without proxy, nothing seems to work. What else can we do?

    Thanks a lot.


  • Related Answers
  • Joe Internet

    The option that you want is bridging, which will put the VM on the same subnet as the host. NAT would put it on a different subnet, but should still allow you to reach the internet.

    Okay, one thing that I've run into with VirtualBox is that sometimes the VM description file becomes corrupted, and something stops working, such as the virtual NIC. The fix (for me) has always been to just create a new VM, which creates a fresh description file for that new VM. If this happens after I have already installed the OS, I simply attach the virtual hard drive to the new VM, and all is well.

  • matpol

    You should be able to use bridging to what you want. Does the vm actually get an IP address? I am guessing this is a problem with the setup of the guest rather than the virtualbox settings. You can use ifconfig to do this on the command line.