I have two virtual machines set up on my Virtualbox: a Debian 8.7.1 and a Ubuntu Server 17.04 one. My host is Windows 10.

I made it work the host-only adapter from Virtualbox on Debian by simply turning it on the option on Virtualbox and it worked like magic. However on Ubuntu Server it doesn't display the new network on ifconfig. I tried with DHCP on and off.

I tried to set it up manually on /etc/network/interfaces with a static IP by the name of eth1 or enp0s4 (the NAT interface has the name of enp0s3 and no results.

However, I tired to swich places with the adapters and I found out that enp0s3 was now the host-only network, but the NAT network was gone. So apparently the guest doesn't know more than two networks (the enp0s3 and the loopback).

How to fix this?

  • Could you post the configuration file of you'r Ubuntu VM ? It is .vbox file. Default it is can be located here in windows. ~/VirtualBox VMs/NAME_OF_VM/NAME_OF_VM.vbox Example location: ~/VirtualBox VMs/MyTestVm/MyTestVm.vbox – Vis25 May 6 '17 at 21:30

I encountered the same problem and discovered that the second interface shows up in the output of ip addr show, but not ifconfig. I don't know the technical reason for this, but ifconfig has been more-or-less deprecated on Linux for a while.

On my machine, my second interface is named enp0s8, so it's probably present on your VM, but with a different name than you expected.

| improve this answer | |
  • 1
    well, enp0s8 (I know that I wasn't crazy when that showed up on the boot) is listed on ip addr show but for some reason is was down. I turned it up and now shows on ifconfig too – athosbr99 May 6 '17 at 22:39
  • however enp0s8 doesn't get a valid IPv4 for some reason and nor NAT or host-only works – athosbr99 May 6 '17 at 22:59
  • That sounds like a separate problem. You should probably open a new question and include the contents of /etc/network/interfaces and the output of ip addr show. If my answer solved your original problem of not being able to locate your second interface, I'd be grateful if you'd mark it as accepted. – Ben May 7 '17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.