Solve the problem that Nic cannot be started after Centos is cloned in vmvm.

Source: Internet
Author: User

Solve the problem that Nic cannot be started after Centos is cloned in vmvm.

0. Previous words: long-standing problems

These problems often occur before, but because we cannot find a solution, we can only try to install a new operating system by ourselves, although it is a waste of time, but it cannot be solved.

However, it is always difficult to solve the problem. After Various searches and inquiries, I found the following very good solution. After testing, this solution can solve the problem perfectly.

1. cause: the NIC cannot be configured after Centos is cloned.

Multiple Linux operating systems are often used in the experiment environment. To avoid the waiting time for re-installation, we generally clone the operating system, however, the cloned operating system cannot start the NIC, as shown in the following figure:


If the NIC cannot be started, network connection becomes a problem, but the Linux operating system without network connection is very troublesome for O & M testing. What should I do?

2. Problem Analysis: Why the NIC cannot be started

The problem lies in/etc/udev/rules. the file d/70-persistent-net.rules is bound to the NIC and mac address. That is to say, the cloned operating system is the same as the original operating system, however, the cloned operating system changes the MAC address of the NIC because of the NIC. In this case,The NIC and MAC address of our operating system are different from those bound in/etc/udev/rules. d/70-persistent-net.rules, so the NIC cannot be started.

3. Solution: delete the file bound to the NIC

Since the above mentioned file is bound with the previous Nic and MAC address, and cannot match the current Nic and MAC address, the NIC cannot be started, we can delete this file:

1[root@xpleaf~]#rm/etc/udev/rules.d/70-persistent-net.rules

After deletion, restart the system. The system will automatically generate a new configuration file bound to the current Nic and MAC address. In this way, our Nic can be started.

Of course, you can also manually modify the above file by yourself in addition to the method that seems to be a little extreme when using the delete method. However, it is much more troublesome than the delete method!

Related Article

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.