After clone a CentOS VM, there are network & hostname need to be update.

Update hostname:

  1. /etc/hosts
  2. /etc/sysconfig/network
  3. # hostname <name>

Update NIC:

  1. /etc/udev/rules.d/70-persistent-net.rules: delete old NIC information
  2. /etc/sysconfig/network-scripts/ifcfg-xxx: delete UUID line and update HWADDR
  3. # start_udev
  4. #uuidgen >> /etc/sysconfig/network-scripts/ifcfg-xxx
  5. /etc/sysconfig/network-scripts/ifcfg-xxx: update UUID by add "UUID="
  6. # service network restart

Reference:

http://www.ichiayi.com/wiki/tech/linux_hostname

http://linuxtoolkit.blogspot.tw/2012/10/updating-udev-configuration-on-centos.html

創作者介紹

空中精靈.SkyElf

stevennick 發表在 痞客邦 PIXNET 留言(0) 人氣()