After the virtual machine clones the CentOS host, the hostname and MAC address are consistent with the previous host, and when it causes the clone machine to fail to obtain the IP address, the following is resolved:
1. View version
Command: Cat/etc/redhat-release
2. View the current host name
Command: Uname-a
3, modify the host name, modify the configuration file (can not modify the hostname, LAN does not affect IP access)
Command: Vi/etc/hostname save exit, restart effective
4, check the current network status, not automatically get the IP address, MAC address is also consistent with the onstage host.
Command: IP addr
5, delete the/etc/udev/rules.d/70-persistent-net.rules file (this file determines the network card and MAC address binding), restart the host.
Command: Rm/etc/udev/rules.d/70-persistent-net.rules
6, the MAC address has been automatically obtained, and automatically get to the IP
Modify MAC address after virtual machine cloning CentOS7.4