10.3. Sealing Templates in Preparation for Deployment
10.3.1. Sealing a Linux Virtual Machine Manually for Deployment as a Template
Summary
Generalize (seal) a Linux virtual machine before making it into a template. This prevents conflicts between virtual machines deployed from the template.
Procedure 10.7. Sealing a Linux Virtual Machine
- Log in to the virtual machine. Flag the system for re-configuration by running the following command as root:
# touch /.unconfigured - Remove ssh host keys. Run:
# rm -rf /etc/ssh/ssh_host_* - Set
HOSTNAME=localhost.localdomainin/etc/sysconfig/network - Remove /etc/udev/rules.d/70-*. Run:
# rm -rf /etc/udev/rules.d/70-* - Remove the
HWADDR=line from/etc/sysconfig/network-scripts/ifcfg-eth*. - Optionally delete all the logs from
/var/logand build logs from/root. - Shut down the virtual machine. Run:
# poweroff
Result
The virtual machine is sealed and can be made into a template. You can deploy Linux virtual machines from this template without experiencing configuration file conflicts.