The NIC cannot be started after cloning the Linux Virtual Machine VMware

Source: Internet
Author: User

The NIC cannot be started after cloning the Linux Virtual Machine VMware

In Linux, the clone feature of VMware causes Nic errors and network connection failure. How can this problem be solved? The following section describes how to solve Nic errors after cloning a Linux Virtual Machine. Let's take a look.

1. Problem Description

Cloning virtual machines in VMware is a common issue. You can directly clone virtual machines that use Winows as the client. The network cannot be started after the client is cloned from a Linux virtual machine.

When you run the service network start command, the following error occurs:

Device eth0 does not seem to be present

2. Cause Analysis

Using the clone function of Vmware, a new virtual machine is configured with a NIC with a different MAC address from the original Virtual Machine Nic. For a Linux system such as CentOS, the MAC address of the NIC during running is recorded in the/etc/udev/rules. d/70-persistent-net.rules file. This record is also saved in the cloned new system.

When the new system is started, because vmware has configured different MAC addresses for it, the system will regard the NIC of the new MAC address as eth1 when scanning the hardware, in addition, it is added to the above files. At this time, the/etc/sysconfig/network-scripts/ifcfg-eth0 in the configuration file records the original MAC address, and this MAC address does not exist in the new system, so it cannot be started.

3 Solution

In the new system, delete the eth0 line corresponding to the old MAC recorded in the rules file, and change the eth1 name corresponding to the new MAC to eth0. Then change the hdaddr value in the ifcfg-eth0 file to the new MAC address.

In this way, rules and ifcfg-eth0 correspond to each other (the eth0 in rules corresponds to the ifcfg-eth0 file name, the mac in rules corresponds to the hdaddr in the ifcfg-eth0 file. In this case, you need to restart the system and everything will be OK.

The above describes how to solve the NIC error after cloning a Linux Virtual Machine. Because the cloned MAC address does not exist, You can reset the MAC address to solve this problem.

This article permanently updates the link address:

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.