After cloning a virtual machine through centos, it is found that the NIC cannot be started or cannot access the Internet.

Source: Internet
Author: User

1. Disable the network manager.

Chkconfig -- level 35 network on

Chkconfig -- level 0123456 NetworkManager off

Restart

2,

Delete the/etc/udev/rules. d/70-persistent-net.rules file and restart it. The eth0 Nic is started successfully and the/etc/udev/rules. d/70-persistent-net.rules file is regenerated.

It should be enough.

 

3. Modify the NIC configuration of the machine.

VI/etc/sysconfig/network-scripts/ifcfg-eth0

 

4. Modify the Host Name

VI/etc/sysconfig/Network

 

 

The following is a good ifcfg-eth0 file in the virtual machine:

 

DEVICE="eth0"NM_CONTROLLED="yes"ONBOOT="yes"IPADDR=192.168.9.202NETMASK=255.255.255.0BOOTPROTO=yesTYPE="Ethernet"UUID="4874beeb-8c63-4b56-96f2-d78de825ceb2"PREFIX=24DEFROUTE=yesIPV4_FAILURE_FATAL=yesIPV6INIT=noNAME="System eth0"HWADDR=00:0C:29:80:64:30LAST_CONNECT=1355405012GATEWAY=192.168.9.2DNS1=8.8.8.8USERCTL=no

 

 

 

Related Article

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.