Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2404680
  • 博文数量: 328
  • 博客积分: 4302
  • 博客等级: 上校
  • 技术积分: 5486
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-01 11:14
个人简介

悲剧,绝对的悲剧,悲剧中的悲剧。

文章分类

全部博文(328)

文章存档

2017年(6)

2016年(18)

2015年(28)

2014年(73)

2013年(62)

2012年(58)

2011年(55)

2010年(28)

分类: 虚拟化

2012-09-06 15:08:48

用ESX克隆虚拟机的时候,会发现网卡编号变化了,原来的eth0,eth1不见了,而出现了eth2,eth3。我估计可能的原因是ESX在创建虚拟机时,会重新创建网卡,当系统发现网卡和配置不一样时,就新建了新的网络接口。

可以用下面的方法把eth0改回来:

修改70-persistent-net.rules文件

  1. [root@redhat89178 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
  2. # This file was automatically generated by the /lib/udev/write_net_rules
  3. # program, run by the persistent-net-generator.rules rules file.
  4. #
  5. # You can modify it, as long as you keep each rule on a single
  6. # line, and change only the value of the NAME= key.

  7. # PCI device 0x15ad:0x07b0 (vmxnet3)
  8. # 把原来的配置注释掉
  9. #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:9c:00:99", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

  10. # PCI device 0x15ad:0x07b0 (vmxnet3)
  11. # 把新出现的eth2改为eth0
  12. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:9c:00:9a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

更改网卡配置文件

  1. [root@redhat89178 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
  2. DEVICE="eth0"
  3. BOOTPROTO=static
  4. # 把MAC地址改成新的地址
  5. HWADDR="00:50:56:9C:00:3A"
  6. ...

更新主机名

  1. [root@redhat89178 ~]# cat /etc/sysconfig/network
  2. NETWORKING=yes
  3. HOSTNAME=<new_hostname>
  4. GATEWAY=10.10.10.1

阅读(2012) | 评论(0) | 转发(1) |
0

上一篇:MySQL正则表达式

下一篇:使用YaST升级sles10

给主人留下些什么吧!~~