Eth0 cannot be found after VMware clones Linux

Source: Internet
Author: User

Eth0 cannot be found after VMware clones Linux

Occurrence:

I want to build a cluster quickly because I am learning Hadoop. Therefore, CentOS is directly installed on the Windows operating system with VMware. After configuring the hadoop development environment, the clone function is used to clone two other virtual machines.

However, when I use the ifconfig command to modify the Virtual Machine IP address, I am told that eth0 cannot be found. Directly modify the configuration file/etc/sysconfig/network-scripts/ifcfg-eth0, it is useless after the system is restarted.

You can use ifconfig to check whether eth0 exists. Only eth2. therefore, you should have created a new Nic when creating a virtual machine. When the system finds that the NIC and system configuration are inconsistent, a new network interface is created.

Solution: Configure eth0 back

Modify the/etc/udev/rules. d/70-persistent-net.rules File
Change eth2 in PCI device 0x1022: 0x2000 (vmxnet) to eth0 using # annotation, remember the MAC address ATTR {address }== "00: 0c: 29: AB: c5: 2c", and exit and save.
Modify Nic profile/etc/sysconfig/network-scripts/ifcfg-eth0
Modify the IP Address: IPADDR = 192.168.0.102 (because I only use the host-only link, so it is a static IP address). Modify the MAC address HWADDR = 00: 0C: 29: AB: C5: 2c, exit and save.
Modify the host name HOSTNAME = hadoop2 in the/etc/sysconfig/network File
Run the command: service network restart. A prompt message is displayed, indicating that eth0 takes effect.
Bringing up interface eth0: Active connection state: activating
Active connection path:/org/freedesktop/NetworkManager/ActiveConnection/1
State: activated
Connection activated

Restart reboot.

[Root @ hadoop2 ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: AB: C5: 2C
Inet addr: 192.168.0.102 Bcast: 192.168.0.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: feab: c52c/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 177 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 61 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 17634 (17.2 KiB) TX bytes: 7611 (7.4 KiB)
Interrupt: 19 Base address: 0x2024

Eth0 cannot be found after cloning VMware

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.