Skip to content

Instantly share code, notes, and snippets.

@fukawi2
Created June 12, 2019 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fukawi2/099f23673c0d6a3cbdb510358a76fdd3 to your computer and use it in GitHub Desktop.
Save fukawi2/099f23673c0d6a3cbdb510358a76fdd3 to your computer and use it in GitHub Desktop.
seal a redhat vm for deployment/conversion to template
# Source: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/sect-Sealing_Virtual_Machines_in_Preparation_for_Deployment_as_Templates.html
touch /.unconfigured
yum clean all
rm -rf /etc/ssh/ssh_host_*
rm -rf /etc/udev/rules.d/70-*
sed -e '/HWADDR=/d' -i /etc/sysconfig/network-scripts/ifcfg-*
find /var/log -type f -delete
history -c
shutdown -h now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment