Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
2  
If you would like to avoid the system restart, you can use "sudo service networking restart" instead. –  ssamuel Aug 29 '12 at 15:11
add comment

Your Answer

 
discard

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.