2.6. Sealing a Linux Virtual Machine for Deployment as a Template using sys-unconfig
Summary
Generalize (seal) a Linux virtual machine using the sys-unconfig command before making it into a template. This prevents conflicts between virtual machines deployed from the template.
Procedure 2.2. Sealing a Linux Virtual Machine using sys-unconfig
- Log in to the virtual machine.
- Remove ssh host keys. Run:
# rm -rf /etc/ssh/ssh_host_* - Set
HOSTNAME=localhost.localdomainin/etc/sysconfig/network - Remove the
HWADDR=line from/etc/sysconfig/network-scripts/ifcfg-eth*. - Optionally delete all the logs from
/var/logand build logs from/root. - Run the following command:
# sys-unconfig
Result
The virtual machine shuts down; it is now sealed and can be made into a template. You can deploy Linux virtual machines from this template without experiencing configuration file conflicts.