Solve the problem that the system can't get online after cloning Linux in virtual machine.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.