Prepare a RHEL host for cloning

prepare a RHEL/CentOS/etc host for cloning

prepare a RHEL/CentOS/etc host for cloning (eg, duplicating a Virtual Machine or creating a VM Template), use the following commands as the last steps:

touch /.unconfigured
rm -f /etc/ssh/ssh_host_*
ifdown eth0
sed -i '/^HWADDR=.*$/d' /etc/sysconfig/network-scripts/ifcfg-eth0
ifup eth0
rm -f /etc/udev/rules.d/70-persistent-net.rules
shutdown -h now