今天在練習的時候忽然想到若是當前使用的虛擬機中的系統壞掉或者出現未知的故障而影響學習進度怎麼辦,畢竟重裝一次系統要耽誤很多時間,因而想把當前使用正常的系統COPY一個備份網絡
COPY完以後用VMware打開並更更名字,開機OK,登陸OK,測試網絡faile……重啓網卡ide
提示「Device eth0 does not seem to be present,delaying initialization」學習
仔細想一想,克隆備份……哦,網卡設置確定不對,可當前這臺虛擬機的網卡相關信息去哪兒找呢測試
百度一下找到下面這個文件spa
/etc/udev/rules.d/70-persistent-net.rulesip
打開generator
# This file was automatically generated by the /lib/udev/write_net_rules虛擬機
# program, run by the persistent-net-generator.rules rules file.it
#io
# 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:27:aa:db", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:0e:59:33", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
記錄下eth1的MAC
去/etc/sysconfig/network-scripts/ifcfg-eth0中更改MAC, DEVICE和static的IP地址保存後重啓網卡……OK