最近在学配置ZooKeeper集群需要多台Linux,通过复制已安装好的系统是最好的选择,复制完成后进入系统使用ifconfig发现没有eth0的选项无法使用网络。于是查看/etc/udev/rules.d/70-persistent-net.rules文件,发现多了一个eth1!
我的解决过程如下:
1、复制虚拟机
2、查看IP发现没有eth0
3、修改/etc/udev/rules.d/70-persistent-net.rules 文件,将eth0删除将eth1改名为eth0后保存,重启系统(我修改后的内容如下)
4、使用setup修改IP(如果采用编辑/etc/sysconfig/networl-script/ifcfg-eth0的方式修改IP,重启网络还是会出现Device eth0 does not seem to be present错误,亲测!)
5、重启网络:/etc/init.d/network restart
转载于:https://my.oschina.net/harmel/blog/704691