[SOLVED]Missing eth0 in Ubuntu guest

Discussions about using Linux guests in VirtualBox.

[SOLVED]Missing eth0 in Ubuntu guest

Postby tubularbox » 14. Jul 2011, 16:05

Hello guys. I'm not sure if this is a VirtualBox issue or it's just that i'm doing something wrong when configuring the guest, but well,... here i go:

I have a CentOS 5.6 host running VirtualBox 4.0.10 in a box with two network cards (each one connected to a separate router). I have two guests (Ubuntu 10.04 Server -text mode only-) and what i want to do is just to bridge each network card to a guest:

Router0 -> host eth0 -> Ubuntu Guest 1 eth0
Router1 -> host eth1 -> Ubuntu Guest 2 eth0

So, In VirtualBox GUI, i select a VM, went on "configuration" -> "network" and set it in bridged mode (i need it to be bridged, not NAT). I check in "advanced" that the network card selected is the right one, and then start the Ubuntu guest, log in, and launch 'ifconfig', and all i can get is the loopback interface. There's no eth0. So... ¿What happens here?

Also, If i edit /etc/network/interfaces and include eth0 (static ip) and try to put it up ($sudo ifup eth0) all i get is the following:

Code: Select all   Expand viewCollapse view
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device


I've googled it and found that it can be due to some issue with MAC addresses, but if i can not see the interface in the guest, then i can not change it's MAC...

Conectivity is ok in the host machine: i managed to ping both gateways and got internet access, can browse, etc... ¿any clue? :?: :?:
Last edited by tubularbox on 14. Jul 2011, 17:31, edited 1 time in total.
tubularbox
 
Posts: 11
Joined: 13. Jul 2011, 17:54
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Ubuntu 11.04 Server

Re: Missing eth0 in Ubuntu guest

Postby fixedwheel » 14. Jul 2011, 16:26

each time you give a new MAC address (in VBox guest settings) Debian and Ubuntu guests udev assigns a new eth number
edit /etc/udev/rules.d/70-persistent-net.rules or delete the file: it will be recreated @ next boot
fixedwheel
Volunteer
 
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: Missing eth0 in Ubuntu guest

Postby tubularbox » 14. Jul 2011, 17:22

fixedwheel wrote:each time you give a new MAC address (in VBox guest settings) Debian and Ubuntu guests udev assigns a new eth number
edit /etc/udev/rules.d/70-persistent-net.rules or delete the file: it will be recreated @ next boot


I did that, and solved the problem. Thank you very much!
tubularbox
 
Posts: 11
Joined: 13. Jul 2011, 17:54
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Ubuntu 11.04 Server

Re: Missing eth0 in Ubuntu guest

Postby Panduka1970 » 19. May 2013, 02:55

tubularbox wrote:
fixedwheel wrote:each time you give a new MAC address (in VBox guest settings) Debian and Ubuntu guests udev assigns a new eth number
edit /etc/udev/rules.d/70-persistent-net.rules or delete the file: it will be recreated @ next boot


I did that, and solved the problem. Thank you very much!



Thanks for your post forum.

I also able to solve the problem in that way,
additionally after you restart, you should should make sure to active the eth0, eth1, or eth2 ........ by looking at newly created 70-persistent-net.rules
thanks again and cheers
Panduka1970
 
Posts: 1
Joined: 19. May 2013, 02:50

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby sxg » 20. Nov 2013, 20:45

Thanks a lot
I was really in the dark
And after applying this, it solved my problem
sxg
 
Posts: 3
Joined: 20. Nov 2013, 20:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Linux RHEL

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby gmadeira » 1. Apr 2014, 01:28

Hey guys please help me. For me it didnt work. I've tried everything changing the network settings on virtual box. It was ok when I was using it wirelessly but now I have to set it up with cable connection. In fact I would like to work with both wireless and cable but NEVER could make it work. Now none of them is working. I use bridge because I need internet at guest and host and need them to comunicate. My ubuntu has static ip now. It was working with no problem but not anymore. Any good soul could help me ?
gmadeira
 
Posts: 1
Joined: 1. Apr 2014, 01:24

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby socratis » 1. Apr 2014, 08:04

A bridged connection will require either a fixed IP, or a DHCP server (like a home router or a modem) at the end of the cable, where both host and guest will get their IPs from. Do you have that?
socratis
Volunteer
 
Posts: 2417
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby mpack » 1. Apr 2014, 14:55

Moving this discussion to "Linux Guests".

@gmadeira: Conspicuous by its absence is any mention that eth0 is missing from your Linux guest. If it is missing then see the thread above which will certainly fix it, otherwise please start another discussion. This is not a general internet problems thread.
mpack
Site Moderator
 
Posts: 16561
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby Deval Bhamare » 29. Jul 2014, 12:16

gmadeira wrote:Hey guys please help me. For me it didnt work. I've tried everything changing the network settings on virtual box. It was ok when I was using it wirelessly but now I have to set it up with cable connection. In fact I would like to work with both wireless and cable but NEVER could make it work. Now none of them is working. I use bridge because I need internet at guest and host and need them to comunicate. My ubuntu has static ip now. It was working with no problem but not anymore. Any good soul could help me ?



Add a Bridged Connection to your N/W interface by using Network Options. If you have changed your MAC, then just deleting /etc/udev/rules.d/70-persistent-net.rules is not enough. Ubuntu keeps previous MAC entries as well in this file. While OS load, it cannot find previous MACs (since you have changed it to new) and hence fails at that point, failing to add new MACs and new interfaces. You need to edit the file. Follow the steps:

1. Go to directory /etc/udev/rules.d/
2. Do "Sudo vi 70-persistent-net.rules
3. Comment the OLD MAC entries (e.g. # SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:XX:XX:XX", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1")
4. Sometimes you need to make sure, for the new MACs, the interface names are in correct sequence, i.e. NAME="eth0", "eth1" and so on..

Hope this helps...
Deval Bhamare
 
Posts: 2
Joined: 29. Jul 2014, 12:08

Re: [SOLVED]Missing eth0 in Ubuntu guest

Postby gioperez » 9. Oct 2014, 06:30

Hi i have tried doing what was instructed of removing the rules file. But when restarted the VM the file was not created there. You guys suggest anything I can do to fix this problem? :)
gioperez
 
Posts: 5
Joined: 8. Oct 2014, 06:58


Return to Linux Guests

Who is online

Users browsing this forum: Bing [Bot] and 14 guests