今天在練習的時候突然想到如果當前使用的虛擬機中的系統壞掉或者出現未知的故障而影響學習進度怎麼辦,畢竟重裝一次系統要耽誤不少時間,於是想把當前使用正常的系統COPY一個備份
COPY完之後用VMware打開並更改名字,開機OK,登錄OK,測試網絡faile……重啟網卡
提示“Device eth0 does not seem to be present,delaying initialization”
仔細想想,克隆備份……哦,網卡設置肯定不對,可當前這台虛擬機的網卡相關信息去哪兒找呢
百度一下找到下面這個文件
/etc/udev/rules.d/70-persistent-net.rules
打開
# 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: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