昨天在vm里面克隆了个虚拟机,克隆之后,启动了网卡起不来,已启动就报
Device eth0 does not seem to be present, delaying initialization.[FAILED]
经过各种google,最终要是找到了答案
使用克隆后的虚拟机时发现原来在基本系统中的网卡eth0到了新系统却没有了,使用ifconfig -a会发现只有lo。

http://www.linuxyan.com/linux-service/181.html

因为基本系统的网络相关配置都是基于eth0的,如果基于此克隆虚拟机继续克隆或复制新的虚拟机,网卡的标识每一次都会自动加1变成eth1(第二次克隆会变成eth2),dmesg却显示内核只识别到网卡eth0。

原因分析: 很多Linux distribution使用udev动态管理设备文件,
并根据设备的信息对其进行持久化命名。例如在centos中,udev会在系统引导的过程中识别网卡,
将mac地址和网卡名称对应起来记录在udev的规则脚本中。而VMware会自动生成虚拟机的mac地址。这样,
由于基本系统的虚拟机已经记录了该虚拟机的网卡mac地址对应于网卡eth0,在克隆出的虚拟机中由于mac地址发生改变,
udev会自动将该mac对应于网卡eth1。以此类推,udev会记录所有已经识别的mac与网卡名的关系,所以每次克隆网卡名称会自动加1,
而其实kernel仅仅只识别到一张网卡,跟网卡名相关的网络配置也未发生任何变化。解决方案:
udev将mac与网卡名称的对应关系保存在/etc/udev/rules.d/70-persistent-net.rules中,
可以看到文件内容如下

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7b:60:38", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:29:b9:c5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

在克隆出的虚拟机中只要删除跟NAME=”eth0″相关的行,并且把eth1的改为eth0,并重启系统即可。
另外外一种方法是:把里面的内容都删除,然后重新启动,系统也会重新发现网卡硬件,重新产生该文件

Device eth0 does not seem to be present, delaying initialization.转载的更多相关文章

  1. Linux 克隆虚拟机引起的“Device eth0 does not seem to be present, delaying initialization”

    虚拟机Vmware上克隆了一个Red Hat Enterprise Linx启动时发现找不到网卡,如下所示,如果你在命令窗口启动网络服务就会遇到"Device eth0 does not s ...

  2. linux 网卡问题 Device eth0 does not seem to be present,delaying initialization.

    Device eth0 does not seem to be present,delaying initialization. 网上搜索后才发现原因所在:原来vmware在复制了虚拟机后会自动生成一 ...

  3. Device eth0 does not seem to be present, delaying initialization. 问题

    今天在复制vmware的时候 出现网卡无法启动 报错显示 Device eth0 does not seem to be present, delaying initialization. 这个错误原 ...

  4. VMware报错:“device eth0 does not seem to be present, delaying initialization ”

    转自:http://blog.sina.com.cn/s/blog_77126fa501018s3d.html vmlite虚拟机启动出错,就把这个虚拟机删除掉重新建立,系统虚拟硬盘使用之前的,启动系 ...

  5. Device eth0 does not seem to be present,delaying initialization解决方法

    Bringing up interface eth0:  Device eth0 does not seem to be present, delaying initialization. 在linu ...

  6. device eth0 does not seem to be present, delaying initialization

    在搭建LVS+Keepalived高可用负载均衡环境的过程中,使用VirtualBox复制了两个Centos的环境,并且选中了“重新初始化网卡”的选项,但是在启动这两个复制的Centos环境的时候,发 ...

  7. 问题:Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]—— 找不到网卡。

    克隆虚拟机的时候或其他情况出现以下问题(命令service network restart):   Bringing up interface eth0:  Device eth0 does not ...

  8. linux 启动network后报错:device eth0 does not seem to be present, delaying initialization

    问题背景: 在vsphere client中部署ovf模板后启动linux 的network后提示:device eth0 does not seem to be present, delaying ...

  9. linux 克隆:device eth0 does not seem to be present,delaying initialization

    问题: CentOS6以上的版本在虚拟机中进行克隆复制或者一些列copy动作后导致网络无法启动提示:device eth0 does not seem to be present,delaying i ...

随机推荐

  1. android: SQLite 数据库的最佳实践

    6.5.1    使用事务 前面我们已经知道,SQLite 数据库是支持事务的,事务的特性可以保证让某一系列的操 作要么全部完成,要么一个都不会完成.那么在什么情况下才需要使用事务呢?想象以下场 景, ...

  2. spring官方案例程序

    https://github.com/spring-projects/spring-data-book https://github.com/spring-projects 包含其他相关的应用程序

  3. 解决ASP.NET在IE10中Session丢失问题【转】

    今天发现在IE10中登录我公司的一个网站时,点击其它菜单,页面总会自动重新退出到登录页,后检查发现,IE10送出的HTTP头,和.AUTH Cookie都没问题,但使用表单验证机制(FormsAuth ...

  4. 【资源集合】94个iOS开发资源推荐,帮你加速应用开发

    资源总结类文章总是开发者们所喜欢的,网上已经有各种weekly.头条以及期刊类资源总结,今天这篇来自于开发者Viswateja Reddy的总结.原文对各个项目的介绍非常简单,为了更便于阅读,编辑在原 ...

  5. [转] Autofac创建实例的方法总结

    1.InstancePerDependency 对每一个依赖或每一次调用创建一个新的唯一的实例.这也是默认的创建实例的方式. 官方文档解释:Configure the component so tha ...

  6. mac OSX 上 brew install hive

    本文介绍brew install hive并修改默认的metastore存储方案,改Derby数据库为mysql的方法以及可能遇到的问题的解决方案. 1. 通过homebrew安装hive 1 bre ...

  7. WPF 定时写入文本

    public static void Start() { ThreadStart start = new ThreadStart(ThreadAction); Thread th = new Thre ...

  8. linux 下 取进程占用内存(MEM)最高的前10个进程

    # linux 下 取进程占用 cpu 最高的前10个进程ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head # linux 下 取进程占用内存 ...

  9. 【C#】取得并改变图像解析度

    , , bmpOrg.Width, bmpOrg.Height);       g.Dispose();       // 画像を保存       string dirName = Path.GetD ...

  10. How to get URL parameters with Javascript?

    function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '( ...