I am hosting Ubuntu 16.04 on Virtual Box from Windows 10. Inside that Ubuntu 16.04, there is QEmu emulating ARM processor, running Ubuntu Trusty. However, the ARM Ubuntu doesn't have internet connection thus commands like
apt-get update fail. It doesn't have GUI either. How to setup network connection in the inner-most Ubuntu? The middle Ubuntu and the outer Windows have internet connection.
In the ARM Ubuntu, /etc/network/interfaces is:
source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
ip a command gives the following output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever
For setting up ARM-Ubuntu on QEmu I mostly followed the steps from https://wiki.ubuntu.com/Kernel/Dev/QemuARMVexpress , with minor modification e.g. that they install Saucy release, but it's no more available, so I installed Trusty; also QEmu of newer version needs different parameters.
The problem has been fixed indirectly, perhaps temporarily, by changing the network setting in the Virtual Box (i.e. for the middle Ubuntu) from "Bridged" to "NAT" (the middle Ubuntu lost connection in this case too), and then changing back to "Bridged". It's weird, so let the question stay for a conscious solution.