复制虚拟机后eht0变为eth1的解决
2015-08-27 13:26
260 查看
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/struggle.gif)
在A机器安装了虚拟机vmA,把虚拟机复制到机器B中vmB
新的虚拟机bmB网络无法使用,并用原操作系统中的网卡eth0在克隆出来的新系统中,网卡号变成了eth1,并且IP地址也丢失了,网络不可正常使用
解决办法
之一
修改克隆后机器(B机器)70-persistent-net.rules文件内容
对克隆后机器(B机器)/etc/udev/rules.d/70-persistent-net.rules文件进行两步修改:
(1) 将原NAME="eth0"行内容注释
(2) 将NAME="eth1"行内容中的"eth1"修改成"eth0"
修改完成后内容如下:
# 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 0x8086:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:5e:35:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3a:f2:8e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
之二
修改克隆后机器(B机器)的Mac地址与IP地址
[root@ol6_weblogic_1 network-scripts]# vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:3a:f2:8e"
NM_CONTROLLED="yes"
ONBOOT="yes"
IPADDR=192.0.0.207
NETMAST=255.255.255.0
TYPE="Ethernet"
特别注意:
修改的MAC地址,只能是与70-persistent-net.rules文件中ATTR{address}相同的地址
之三
经验证,重启网络服务(service network restart)方式,IP地址可以变化过来,但是网络接口名称eth1修改不生效,
需重启系统!
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/bye.gif)
相关文章推荐
- uvalive 6955 Finding Lines rand()应用
- [技巧篇]15.火狐浏览器缓存设置,提高开发效率!
- TCP/IP TIME_WAIT状态原理
- uvalive 6955 Finding Lines rand()应用
- uva 588 - Video Surveillance(半平面相交)
- 网络通信
- 日语标点符号的用法
- JSON example with RESTEasy + JAXB + Jettison
- Dubbo入门基础与实例讲解
- thinkphp系统常量与自定义常量
- 树的存储结构
- hdoj 1596 find the safest road
- uva 11265 - The Sultan's Problem(多边形切割)
- jQuery formValidator表单验证插件
- 运算符优先级
- 有关ListView优化机制及滑动时数据错乱问题的讨论
- Apache+tomcat集群
- linux grep 查找字符串
- uva 11072 - Points(凸包)
- 几种常见模式识别算法整理和总结