解決克隆 Linux虛擬機後修改後的機器的ip、mac、uuid失敗的問題

So here’s how we fix it:


Remove the kernel’s networking interface rules file so that it can be regenerated

 


# rm -f /etc/udev/rules.d/70-persistent-net.rules

 


Restart the VM

 


# reboot

 


UPDATE your interface configuration file

 


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

Remove the MACADDR entry or update it to the new MACADDR for the interface (listed in this file: /etc/udev/rules.d/70-persistent-net.rules).


Remove the UUID entry


Save and exit the file


Restart the networking service

 


# service network restart

 


Happy cloning!


二.另一種方法

造成這樣的原因,是因爲在虛擬機(Vmware)中移動了Centos系統對應的文件,導致重新配置時,網卡的MAC地址變了,輸入ifconfig -a,找不到eth0

·······

 

安裝完一個centos虛擬機,又拷貝一份,開機後網卡無法正常啓動,報錯:Device eth0 does not seem to be present, 

delaying initialization


解決:# mv /etc/sysconfig/network-scripts/ifcfg-eth0 

sysconfig/network-scripts/ifcfg-eth1


vim 

sysconfig/network-scripts/ifcfg-eth1


修改DEVICE="eth0" 

爲DEVICE="eth1"

修改IP地址,刪除mac地址(HWADDR),刪除UUID項。

然後重啓啓動網卡嘗試下


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