Vmware克隆Centos 6.4後 重新設置eth0

問題:用Vmware克隆Centos 6.4後,發現系統內只有eth1,而且/etc/sysconfig/network-scripts/下只有,ifcfg-eth0文件,雖然可以上網,但無法設置靜態IP。

ifconfig eth0

eth1: error fetching interface information: Device not found


解決:vi /etc/udev/rules.d/70-persistent-net.rules 顯示爲:

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:48:85:9c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


將 NAME="eth1" 改成NAME="eth0"

並將 ATTR{address}=="00:0c:29:48:85:9c",中的網卡地址改到

/etc/sysconfig/network-scripts/ifcfg-eth0 文件中,HWADDR="00:0C:29:48:85:9C",使他們對應。

然後reboot

ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:0C:29:48:85:9C  

         inet addr:192.168.74.148  Bcast:192.168.74.255  Mask:255.255.255.0

         inet6 addr: fe80::20c:29ff:fe48:859c/64 Scope:Link

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

         RX packets:5032 errors:0 dropped:0 overruns:0 frame:0

         TX packets:3674 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0 txqueuelen:1000

         RX bytes:5762656 (5.4 MiB)  TX bytes:209372 (204.4 KiB)


完成。


參考:

Red Hat Enterprise Linux 6 - Guest Cloning Problem

http://communities.vmware.com/thread/305112?start=0&tstart=0

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