I recently learned Linux, want to clone more than one CentOS to practice installing software under Linux, configure the environment. Because the system is not very familiar with, want to maintain a pure version, if the system play bad, delete and then re-clone a resume configuration, to save time. Later found that the cloned system can not surf the Internet, find a solution on the Internet. Summarized as follows:
Feeling is the cause of cloning, will be the original Mother machine network card information is saved to eth0, and the new machine start will produce find their network card information, generate eth1. However, the other network configuration of the machine is still unchanged, so the eth1 will not be started, and eth0 did not find, the specific will be prompted because the MAC address is wrong and so unable to surf the internet.
All we have to do is fight first.
Ifconfig-a
Find your MAC address. Generally hwaddr 00:0c:29:xx:xx:xx
And then you remember first.
Found it
Cd/etc/udev/rules.d
Under the 70-persistent-net.rules.
VI 70-persistent-net.rules
You should see the cloned machine with two PCI NIC information. One for eth0 and one for eth1.
Delete the text from #pci to Name= "eth0". Then change the eth1 back to eth0.
: Wq
Save exit.
Then change the configuration information for the NIC.
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Found a line hwaddr=
The = number is followed by the MAC address of the original parent machine.
Change to the MAC address of the machine above, and then restart the computer. will be able to surf the Internet.
Service Network restart
Restart the network.
Solve the problem that the system can't get online after cloning Linux in virtual machine.