VMWare Ubuntu10.04 克隆后的“No such device eth0”错误
来源:互联网 发布:混合高斯模型的em算法 编辑:程序博客网 时间:2024/05/25 18:10
运行环境:XP系统,VMWare 7,Ubuntu 10.04 Server
在本地为Ubuntu创建VMWare的虚拟机后,复制,创建一个新的克隆镜像,启动,网卡无效,显示错误”eth0: ERROR while getting interface flags: No such device”,开机ifconfig不显示eth0。
原因
新克隆的虚拟机镜像的网卡mac地址已经变更。打开虚拟机的.vmx文件,ethernet0.generatedAddress项记录了该虚拟机的mac地址。
查看所有适配器信息
ifconfig -a
发现除了原来的eth0外,Ubuntu已经将新网卡命名为eth1。
Ubuntu保存网卡mac地址和设备名的配置文件在
/etc/udev/rules.d/70-persistent-net.rules
网卡的网络配置保存在
/etc/network/interfaces该配置文件中只有原来eth0的配置信息。
解决方案1
移动/删除rules文件。(已验证)
重启后Ubuntu会创建新的rules文件。
将新网卡辨认为eth0,沿用原eth0的网络配置。
如果网络配置是自动获取IP,则无需做其他修改。
sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old
解决方案2
修改rules文件。(已验证)
sudo pico /etc/udev/rules.d/70-persistent-net.rules
原内容如下
# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:xx:xx", ATTR{type}=="1", NAME="eth0"# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth1"删除eth1的配置,用eth1的mac地址替代eth0的mac地址。# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth0"
重启后Ubuntu同样会将新网卡辨认为eth0,沿用原eth0的网络配置。
如果网络配置是自动获取IP,则无需做其他修改。
解决方案3
修改interfaces文件。(已验证)
sudo pico /etc/network/interfaces
将所有的eth0替换为eth1。
如果是静态地址则同时修改相应设置。
- VMWare Ubuntu10.04 克隆后的“No such device eth0”错误
- VMWare克隆后Ubuntu的"No such device eth0"错误
- VMWare克隆后Ubuntu的"No such device eth0"错误
- VMWare克隆后Ubuntu的"No such device eth0"错误
- VMWare克隆后Ubuntu的"No such device eth0"错误
- VMware克隆虚拟机 eth0: unknown interface: No such device
- 嵌入式 Vmware中安装Linux虚拟机出现没有eth0的解决方案No-such-device-eth0
- Vmware上Clone Ubuntu虚拟机后提示"No such device eth0"
- VMWARE UBUNTU 虚拟机中 启动网络报“eth0 No such device”的解决方案
- Ubuntu No such device eth0
- ubuntu12.04克隆后没有cannot find device eth0
- ifconfig eth0 XXX 显示NO SUCH DEVICE
- VMWARE UBUNTU网口自动增加 eth0 no such device解决方案
- 在VMware中解决克隆后eth0不见的问题
- eth0,eth0: ERROR while getting interface flags: No such device
- VMware 克隆linux后找不到eth0
- Vmware克隆Centos后 重新设置eth0
- VMWare克隆CentOS虚拟机后eth0不存在
- Virtual PC 使用指南
- BASH命令和SHELL脚本总结(12)如何对字段进行操作
- VM中CentOS 服务器配置,LAMP安装及无其它机器无法访问等问题。
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 使用Fusion Charts制作报表(dom4j生成XML)
- VMWare Ubuntu10.04 克隆后的“No such device eth0”错误
- poj 2378 树形 dp
- sql去掉重复记录
- S3C6410 FrameBuffer编程(一) ---- 获取屏幕属性
- Lua 字符串替换函数 string.gsub(s, pat, repl [, n])
- S3C6410 FrameBuffer编程(二) ---- 与BMP格式图片相关的结构体
- javaEE性能调优
- S3C6410 FrameBuffer编程(三) --- 向LCD中写入数据
- 遍历文件夹并转换文件脚本