If you are looking for software to use, go to Huajun Software Park! software release AI product list
Location: Home pageTutorial strategyTutorialComputer software tutorials VMware clone...

What should I do if VMware clones Linux and prompts that eth0 cannot be found?

Author: Uchiha Sasuke Date: 2017-05-15

VMware Workstation
VMware Workstation-17.5.1

System assistance Storage size: 615.58MB Time: 2022-12-06

Software introduction: VMware Workstation is a powerful desktop virtual computer software. If you need a virtual machine product, you might as well download...

Download now

VMware is a virtual machine that can load various systems, but when VMware clones Linux, it prompts that eth0 cannot be found. Regarding this problem, many friends do not know how to deal with it. Let me share with you the solution to the problem that eth0 cannot be found.

 What should I do if VMware clones Linux and prompts that eth0 cannot be found?

What happens:

When using the ifconfig command to modify the virtual machine IP address, it prompts that eth0 cannot be found. Directly modifying the configuration file /etc/sysconfig/network-scripts/ifcfg-eth0 and restarting the system are of no use.

After checking with ifconfig, I found that there is no eth0, only eth2. So it should be that a network card was re-created when creating the virtual machine. When the system finds that the network card is not consistent with the system configuration, it creates a new network interface.

Solution: Configure eth0 back

Modify the /etc/udev/rules.d/70-persistent-net.rules file

Comment PCI device 0x1022:0x2000 (vmxnet) with #, change eth2 in PCI device 0x1022:0x2000 (vmxnet) to eth0, remember the MAC address ATTR{address}== "00:0c:29:ab:c5:2c", exit and save.

Modify the network card configuration file /etc/sysconfig/network-scripts/ifcfg-eth0

Modify the ip address: IPADDR=192.168.0.102 (because I only use the host-only link method, so it is a static ip), 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

Execute the command: service network restart, and a prompt message indicating that eth0 has taken effect will appear.

Bringing up interface eth0: Active connection state: activating

Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1

state: activated

Connection activated

It's best to 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 txqueuelen:1000

RX bytes:17634 (17.2 KiB) TX bytes:7611 (7.4 KiB)

Interrupt:19 Base address:0x2024

The above is the editor’s summary of the solution to the problem that eth0 cannot be found when cloning VMware Linux. If you also encounter this problem, you can install the method introduced in this article to deal with it. I hope it will be helpful to you.

Related articles