Unable to connect to the Internet after vmware clone

After configuring the virtual machine, we want to reuse the configurations of the first virtual machine, so we will use the cloning method, but with this convenience, there is a disadvantageous problem, that is, after cloning, the virtual The problem of the network card of the machine is as follows:
After cloning,

ifconfig -a

insert image description here
Solution:

  1. vim etc/udev/rules.d/70-persistent-net.rules
    insert image description here
  2. Delete the content of the first network card eth0, and modify the name of the above eth1 network card to eth0, as follows:
    insert image description here
  3. Modify the mac address of eth0 (eth0 here is the name after eth1 was changed just now)
vim etc/sysconfig/network-scripts/ifcfg-eth0

insert image description here
Change HWADDR: HWADDR="00:0c:29:dc:e4:c9"

  1. Restart the virtual machine, executereboot
  2. implementifup eth0
  3. Configure static ip address:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=192.168.0.X
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
service network restart

Guess you like

Origin blog.csdn.net/qa76774730/article/details/82814621