Ubuntu eth0: ERROR while getting interface flags: No such device

This article is step-by-step tutorial how to fix a problem which occured after I restored my virtual machines from backup to my ESXI server.

ifconfig
ifconfig when eth0 is not available

when I used lspci, result was

lspci
lspci result

So network adapter is correctly available in my virtual machine. As next step I need to found out which alias is used for this adapter. I didn’t find any easily way than try et0,eth1,….

ifconfig eth0
eth0: error fetching interface information: Device not found

ifconfig eth1
eth1: error fetching interface information: Device not found

ifconfig eth2
eth2: Link encap: Ethernet HWaddr.....

So, I found my network adapter. Now as last step it’s necessary to update network interfaces to this adapter

sudo nano /etc/network/interfaces

#and change all eth0 to eth1 values
/etc/network/interfaces

As last step restart your machine and everything should work correctly.

External links:

  • http://www.cyberciti.biz/faq/show-ethernet-adapter-ubuntu-linux/