在用vmware以现有的CentOS虚拟机为源克隆操作系统时,克隆成功后的系统重新配置IP地址后重启network服务报错

service network restart

device eth0 does not seem to be present, delaying initialization_present

分析报错原因,是因为Linux绑定了模板机的mac地址导致的

解决方法:把/etc/sysconfig/network-scripts/目录下的网络配置文件修改为与/etc/udev/rules.d/70-persistent-net.rules配置文件中的mac地址一致

cat /etc/udev/rules.d/70-persistent-net.rules

device eth0 does not seem to be present, delaying initialization_present_02

原来克隆完成后系统增加了eth1的配置信息

我们需要在/etc/sysconfig/network-scripts/目录下增加ifcfg-eth1的配置文件

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
vim /etc/sysconfig/network-scripts/ifcfg-eth1

修改ifcfg-eth1配置文件把device的值改为eth1,hwaddr的值改为00:0c:29:ad:ef:b9使其与/etc/udev/rules.d/70-persistent-net.rules配置文件中的eth1的address的mac地址保持一致

device eth0 does not seem to be present, delaying initialization_present_03

保存并推出

重启network服务

service network restart

device eth0 does not seem to be present, delaying initialization_配置文件_04

ok问题解决了