device eth0 does not seem to be present,delaying initializatio設備eth0似乎並不存在,延遲初始化


1、

vi /etc/sysconfig/network-scripts/ifcfg-eth0

ifcfg-eth0的配置文件裏保存了以前的MAC地址,就把這一行***掉在重啓網卡


2、

/etc/udev/rules.d/70-persistent-net.rules ***後重啓機器

因爲這個文件綁定了網卡和mac地址,所以換了網卡以後MAC地址變了,所以不能正常啓動,也可以直接編輯這個配置文件把裏面的網卡和mac地址修改乘對應的,不過這樣多麻煩,直接***重啓,它會自動生成個。


3、解決錯誤:
1. vi  /etc/udev/rules.d/70-persistent-net.rules
    1)註釋或去掉原虛擬機eth0所在的行信息
    2)將新生成的eth1所在的行信息中的eth1改爲eth0,將此行的新mac地址寫入ifcfg-eth0文件對應的mac地址處
2. start_udev
3. service network restart
4. ifconfig -a確認網絡信息


實例:

1、vi  /etc/udev/rules.d/70-persistent-net.rules     這個配置文件eth2修改成eth0,eth3修改成eth1

# 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:0x1521 (igb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:ea:a7:a3:02:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2

# PCI device 0x8086:0x1521 (igb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:ea:a7:a3:02:1f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"


2. start_udev
3. service network restart
4. ifconfig -a確認網絡信息


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章