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


參考

解決辦法:

 

So here’s how we fix it:

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

     

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

     

  2. Restart the VM

     

    # reboot

     

  3. 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

  4. 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項。
然后重啟啟動網卡嘗試下
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM