Two pieces to this answer (actually, networking is trivial in *Nix).
If you have correctly configured VirtualBox, then
ip link set dev eth0 up
dhclient -v eth0
(you might have to omit the -v
flag in non-Debian distros) will connect you to the local dhcp.
If this does not work, make sure VirtualBox gave you an Internet connection, checking that your VM has a network adapter, that it is on NAT or it is a bridge adapter (in which case you will have to make sure you are trying to bridge the V; with the host's true NIC, be that wlan0 or eth0). If necessary, you may try changing the card MAC address, and repeat the above after restarting the VM (otherwise there can be no change of MAC address).
This should be automatic, try restarting the network manager to see what is going on.
service network-manager restart
systemctl restart network-manager
depending upon your version of Debian. You then test whether there are problems by means of
service network-manager status
systemctl status network-manager
and, if it is not running, you will have to search for error messages in /var/log
, especially in daemon.log
. But a catch-all command is
grep -nrI network-manager | less
with output parsed because it is bound to be copious.