In the process of using VMware virtual machines, we may often need to use to clone this operation, but the CentOS system cloning after the need to modify the relevant network settings, the following CENTOS7 and centos6.5 system are described separately:
1. CentOS 7:
Centos7 70-persistent-net.rules in the This file, so the cloned virtual machine (Vmware) need to modify Mac
first, look at the MAC address of the virtual machine Centos7 cloned , and perform "IP addr":
[[Email protected] ~]# IP addr
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
Valid_lft Forever Preferred_lft Forever
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0c:29:c5:51:e7 BRD ff:ff:ff:ff:ff:ff
inet 192.168.1.204/24 BRD 192.168.1.255 Scope Global eno16777736
Valid_lft Forever Preferred_lft Forever
Inet6 FE80::20C:29FF:FEC5:51E7/64 Scope link
Valid_lft Forever Preferred_lft Forever
Note the bold and red words above, this is the new mac Address.
ifcfg-xxx Yes, Span style= "Color:rgb (51,51,51); Font-family:tahoma, ' Arial '; Font-size:14px;text-align:justify;background-color:rgb ( 250,250,252); " > and configure the new host name and IP address . Next, execute service network Restart
CentOS 7 Modify host name command:
Hostname set-hostname HOST2
If the service network restart times the following error after cloning is complete, this method can also be resolved as follows:
[Email protected] network-scripts]# service network restart
Restarting network (via Systemctl): Job for Network.service failed because the control process exited with error code. See "Systemctl Status Network.service" and "Journalctl-xe" for details.
Failed
2. CentOS 6.5
Clone complete and start the virtual machine, delete the /etc/udev/rules.d/70-persistent-net.rules file and configure the new hostname and IP address, restart the virtual machine, restart or new to /etc/udev/rules.d/ 70-persistent-net.rules file with the Mac (i.e. HWADDR) address of the virtual machine. If you have configured the HEADDR configuration in Ifcfg-eth0, you need to pass the /etc/udev/rules.d/70- Persistent-net.rules file to view the newly generated hwaddr modifications, it is recommended that you do not configure HWADDR and UUID in Ifcfg-eth0.
Cloning Centos7 and centos6.5 network configuration on vmwars virtual machines