当前位置:网站首页>The cloned VMware virtual host network card cannot be started solution

The cloned VMware virtual host network card cannot be started solution

2022-06-22 03:26:00 Lao Zhu Yubing

Create a cloned vmware virtual machine , Report after startup , The network is not started .

 

Observe carefully , You will find that there is no eth0 Of ip Address , Because after cloning from the original machine ,centos The original machine is still used eth0 Of mac Address , But this mac Address with vmware Generated mac Different addresses . An error will also be reported when starting the network .

Tips  Device eth0 does not seem to be present 

 

stay centos Next, modify the network configuration parameters

1. [[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 

The network card address is different from the one above , Delete HWADDR and UUID That's ok , After modification, if it is a dynamic acquisition ip The address of the network card is .

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

2. Modify another file

 [[email protected] ~]# vi /etc/udev/rules.d/70-persistent-net.rules 

Contents of the original document :

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:1b:8f:d9", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a6:6a:ef", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Delete the first line , Second elements eth1 It is amended as follows eth0, Last after modification 2 The line reads as follows .

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a6:6a:ef", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Restart after modification centos6, The network card starts automatically ,centos7 After testing, there is no such problem .

原网站

版权声明
本文为[Lao Zhu Yubing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220307006938.html