Solve the problem that eth0 cannot be initialized/eth0 cannot be found after CentOS6.4 is cloned.

Source: Internet
Author: User

Solve the problem that eth0 cannot be initialized/eth0 cannot be found after CentOS6.4 is cloned.

# Ifconfig

Only the local loopback interface can be seen,

Then use

# Ifconfig-

View all available NICs and find that eth1 is not eth0.

Conjecture

During Clone, all Nic configurations of the original virtual machine are cloned,

But in VMware, Clone actually re-creates a server,

MAC addresses and so on will naturally be re-created,

However, because the configurations of the original server are copied, the newly created Nic is no longer eth0, but saved as eth1.

Solution:

Modify/Etc/udev/rules. d/70-persistent-net.rules // configuration file for saving Nic MAC address and other information

First, check that:

# PCI device 0x8086: 0x100f (e1000)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" eth0-MAC ", ATTR {type} =" 1 ", KERNEL =" eth * ", NAME =" eth0"

# PCI device 0x8086: 0x100f (e1000)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" eth1-MAC ", ATTR {type} =" 1 ", KERNEL =" eth * ", NAME =" eth1"

Delete the preceding eth0 information and set eth1-> eth0

# PCI device 0x8086: 0x100f (e1000)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" eth1-MAC ", ATTR {type} =" 1 ", KERNEL =" eth * ", NAME =" eth0"

Then change the MAC address in the ifcfg-eth0 to the eth1-MAC address above, and then configure the IP address and other information,

Restart the server.

Then you can use ifconfig to view the eth0 configuration information again.

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.