用vcenter converter从vmwave workstation clone CentOS去ESXi 需更改网卡MAC

原文:http://www.ryanchapin.com/fv-b-4-655/Cloned-VMware-CentOS6-Server-and--quot-device-eth0-does-not-seem-to-be-present--delaying-initialization-quot--Error-.html


clone CentOS去ESXi,需要更改网卡MAC才可ping通网络

ifconfig命令只看到有lo,没用eth0

wKioL1VOCSaCJ5mxAAGkio4sN3s453.jpg



Recently, I cloned a vmware install of CentOS6 and after firing up the clone and trying to start networking received the error: "device eth0 does not seem to be present, delaying initialization"

It turns out that the NIC on the cloned machine was being renamed and registered to eth1.

To list the current ethn devices:

1,# ls /sys/class/net
eth1 lo
wKiom1VOCECS94YoAAA0PorfMpA605.jpg
There is a device manager, udev, which stores the settings from the NIC of the vm prior to the cloning process.  When you clone a vm it also changes the mac address of the NIC and as a result the vm sees it as a new NIC and assigns it to /dev/eth1.

As a result, we now have to edit the udev config file as well as the ifcfg-eth0 file to get the newly update virtual NIC card to operate on the eth0 device.

2,First, edit: /etc/udev/rules.d/70-persistent-net.rules
wKioL1VOChrBNoVxAAKowX7qZgY386.jpg# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:bc:00:45", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:bc:00:46", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

3,Delete the first SUBSYSTEM entry in the file.

4,Update the 'eth1' attribute in the remaining entry to 'eth0'
wKiom1VODFjxZCYfAAMuTWoLv3Y670.jpg


5,Edit /etc/sysconfig/network-scripts/ifcfg-eth0

 Change the HWADDR to match the new mac address listed in the newly edited 70-persistent-net.rules file.
wKioL1VODkmTSc9fAAEFfDdYbTg622.jpg


6,reboot





你可能感兴趣的:(centos,mac,Address,vmwave,clonet)