VMware clone Centos6.7 virtual machine NIC does not start get IP address

Source: Internet
Author: User
Tags get ip rsync

After the virtual machine clone is started using Ifconfig, no IP address is found, only the loopback address is 127.0.0.1,

The MAC address and host name are the same as the source host (the source host is manually configured IP).

Any execution of the following commands is useless anyway:

/etc/init.d/network restart

Ifup eth0

Workaround:

1. Edit the eth0 configuration file: Vi/etc/sysconfig/network-scripts/ifcfg-eth0, delete the hwaddr address the line and UUID lines are as follows:

hwaddr=00:0c:29:2c:68:9buuid=3f8777e3-1437-4787-9a51-02e890334a4f

Note: Of course, you can also be based on the actual hwaddr and UUID changes, and not delete, it is best to put these two lines commented out, in the production environment, try not to delete things, either after the backup, or comment out, wait half a month or one months after the confirmation will not be the problem, in the deletion.

Eth0 Nic File modified:

[Email protected] cron]# cat/etc/sysconfig/network-scripts/ifcfg-eth0device=eth0type=ethernet#hwaddr=00:0c:29:2c : 68:9bonboot=yesnm_controlled=yesbootproto=noneipaddr=10.0.0.41netmask=255.255.255.0gateway=10.0.0.2dns1= 10.0.0.2ipv6init=nouserctl=no#uuid=3f8777e3-1437-4787-9a51-02e890334a4f

2. Then empty the >/etc/udev/rules.d/70-persistent-net.rules, add to boot:

[Email protected] cron]# tail/etc/rc.local #!/bin/sh## This script would be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don ' t# want to do the full Sys V style init Stuff.touch/var/loc K/subsys/local>/etc/udev/rules.d/70-persistent-net.rules/usr/bin/rsync--daemon

3.ifdown &&ifup eth0, then restart the network card (/etc/sysconfig/network-scripts/ifcfg-eth0)


Tip: The machine name can not be changed, but it is recommended to clone after the hostname modification, this is a habit.

[Email protected] cron]# hostname rsync[[email protected] cron]# cat/etc/sysconfig/networknetworking=yeshostname= Rsync '



This article is from the "Flag of Linux Road" blog, please be sure to keep this source http://chenmingqi.blog.51cto.com/8942827/1887167

VMware clone Centos6.7 virtual machine NIC does not start get IP address

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.