13 Cloning disk images #
This chapter describes how to use cloned images for installing SUSE Linux Enterprise Server. This process is mostly used in virtualized environments.
13.1 Overview #
SUSE Linux Enterprise Server provides a script to clean up configuration that is unique
   to each installation. With the introduction of systemd, unique system
   identifiers are used and set in different locations and files. Therefore,
   cloning is no longer the recommended way to build system images.
   Images can be created with KIWI NG, see
   https://doc.suse.com/kiwi/.
  
To clone disks of machines, refer to the documentation of your virtualization environment.
13.2 Cleaning up unique system identifiers #
Executing the following procedure permanently deletes important system configuration data. If the source system for the clone is used in production, run the clean-up script on the cloned image.
   To clean all unique system identifiers, execute the following procedure
   before or after cloning a disk image. If run on the clone, this procedure
   needs to be run on each clone. Therefore, we recommend to create a
   golden image that is not used in production and only
   serves as a source for new clones. The golden image is already cleaned
   up and clones can be used immediately.
  
   For example, the clone-master-clean-up command removes:
  
- Swap files 
- Zypper repositories 
- SSH host and client keys 
- Temporary directories, like - /tmp/*
- Postfix data 
- HANA firewall script 
- systemd journal 
- Use - zypperto install clone-master-clean-up:- >- sudo- zypperinstall clone-master-clean-up
- Configure the behavior of - clone-master-clean-upby editing- /etc/sysconfig/clone-master-clean-up. This configuration file defines whether users with a UID larger than 1000, the- /etc/sudoersfile, software repositories for package installation, and Btrfs snapshots should be removed.
- Remove existing configuration and unique identifiers by running the script: - >- sudo- clone-master-clean-up