CentOS:Device eth0 does not seem to be present 問題解決方案

來源:互聯網
上載者:User

標籤:ifconfig   網路連接   複製虛所機   mac   

使用Vmware複製linux虛擬機器後,常常是網路連接不上,表現為ifconfig無法看到網卡,即使改了/etc/sysconfig/network-scripts/下的相應網卡檔案onboot=yes也不行,重啟網路時(/etc/init.d/network restart)會出現以下錯誤提示:

    "Device eth0 does not seem to be present, delaying initialization."


這是由於複製機的網卡設定檔錯誤導致的,解決方案:


1.開啟/etc/udev/rules.d/70-persistent-net.rules 檔案。

2.尋找到匹配你機器MAC地址的行,將其“NAME”欄位改為你現在下在使用的網卡裝置名稱(eth0,eth1,eth2等),再將其他MAC不匹配的行刪除或注釋掉。如:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:19:2D:3F:52", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:19:2D:3F:53", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

3.請將/etc/sysconfig/network-scripts/ifcfg-ethX(要改的網卡名)檔案中的MAC地址和網卡名也作相應更改,並將onboot改為yes.

4.重啟虛擬機器,這是必須的。


註:在第二步裡正確的mac地址要到Vsphere client 的管理介面Edit setting去查看,而不是在系統中/etc/sysconfig/network-scripts/中那個。


CentOS:Device eth0 does not seem to be present 問題解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.