Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Ubuntu Server 10.04 as a guest operating system under VirtualBox 3.2.10. My host system is Ubuntu 9.04

I have configured two network adapters for the guess (a NAT one and a host-only one)

The NAT one is recognized without problems by the guest, but in order to recognize the host-only adapter I have to run sudo dhclient, thus making it impossible to run the guest in headless mode.

I'm sure I am forgetting something.

When i run ifconfig right after login I see two interfaces (eth0 and lo), then after running sudo dhclient I see three interfaces (eth0, eth1 and lo)

So the question is: How can I make ubuntu to get the IP from the second adapter at boot time in order to be capable of running headless and accessing it via ssh?

share|improve this question
Sorry, but I've got to ask: Did you run ifconfig or ifconfig -a ?? – Jeremy Oct 17 '10 at 7:10
@Jeremy: ifconfig but then i see your question and ran ifconfig -a. But the output of both commands is (at least for me) exactly the same. Anyway it appears to be a bug in VirtualBox DHCP server implementation. – Cesar Oct 17 '10 at 7:17
Kk, I can't really help you, just wanted to check if the interface was present, but down. Good luck! You could try Oracle <shudder> (Sun) support, if it's a bug in VBox, they'll be all over it. – Jeremy Oct 17 '10 at 8:57

have you got the interface configured in /etc/network/interfaces ? if not add the lines

 auto eth1
 iface eth1 inet dhcp

and restart

share|improve this answer
If you would like to avoid the system restart, you can use "sudo service networking restart" instead. – ssamuel Aug 29 '12 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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