"Eth0:error while getting interface flags:no such device" occurs after the Ubuntu virtual machine mirroring replication

Source: Internet
Author: User
Tags file copy

An Ubuntu VMware image from the internet
After the copy becomes named for VM1 set up the network (in bridge mode) is mainly eth0 (configuration file/etc/network/interfaces and DNS server/etc/resolv.conf
Network services are normal

Second Direct copy vm1 named VM2
After starting with ifconfig found no eth0
Reboot Netwoking/etc/init.d/networking/restart error eth0:error while getting interface flags:no such device
Eth0 is already written in the config file. Why can't I find this device?
Check MAC address no conflict



Workaround Reference Context
Yesterday in the company with VirtualBox installed OpenSuse11.2, and then the VDI file copy home. Rebuild a virtual machine and then prompt eth0:error while getting interface flags:no such device. Network Service start is also failed. The first thing I thought of was the difference between a Mac and a company virtual machine Mac on the home virtual machine. Found a lot of information on the Internet has not been resolved. If you can reload the network module how good, then Linux knowledge is very limited, how to reload are not known. Toss to 1 points more, did not solve, depressed sleep went.
In the morning back to the company, the first thing is toss VirtualBox, I put the Mac a change, sure enough also reported the same mistake. It must be the reason why the Mac is different. Use Ifconfig-a, did not find eth0, inverted found eth1. Restart the network service, prompting eth1 the configuration file was not found. As a/etc/sysconfig/network/, I thought of a ifcfg-eth0 file, but there was no ifcfg-eth1 file. Is the lack of this document, so I renamed Ifcfg-eth0 Ifcfg-eth1, and then restart the Network service, and then ifconfig A, found eth1 out.
Ping www.baidu.com is fine, too. It's so cool, it's settled.

Update, just see on the http://www.cnblogs.com/1327/archive/2009/06/16/1504537.html, know the real reason, MAC address cache, so eth0 configured Mac can't hit, so no Such device
A better solution would be to rm/etc/udev/rules.d/70-persistent-net.rules remove the network configuration cache file and reboot the machine. Note: This method has proven that restarting the network service is not possible. You can use the method of renaming the Ifcfg-eth0 file if you do not want to reboot the machine.

This article from Hi.baidu.com/yingnet, copyright, reproduced Please indicate the source, thank you for your cooperation


Ifconfig-a didn't find eth0.

This is because the (Ubuntu) system has a new NIC andSave the configuration file for the NIC MAC address and device name in/etc/udev/rules.d/70-persistent-net.rulesnetwork configuration of NIC is saved in/etc/network/interfaces, this configuration file holds the configuration information for eth0. When you restart the Ubuntu system after you move/delete the rules file, you will automatically re-create the new rules file, identify the new NIC as eth0, and use the newly configured eth0 network configuration information.

# sudo Mv/etc/udev/rules.d/70-persistent-net.rules/etc/udev/rules.d/70-persistent-net.rules_bak

Or:

#sudo Rm/etc/udev/rules.d/70-persistent-net.rules is because the (Ubuntu) system has a new network card (ETH4), and the configuration file that stores the MAC address and device name of the NIC is/ETC/UDEV/RULES.D /70-persistent-net.rules, the network configuration of the NIC is saved in/etc/network/interfaces, and the configuration file holds eth0 configuration information. When you restart the Ubuntu system after you move/delete the rules file, you will automatically re-create the new rules file, identify the new NIC as eth0, and use the newly configured eth0 network configuration information.

# sudo Mv/etc/udev/rules.d/70-persistent-net.rules/etc/udev/rules.d/70-persistent-net.rules_bak

Or:

#sudo Rm/etc/udev/rules.d/70-persistent-net.rules





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.