Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SUSE Linux Enterprise Server Documentation / Deployment Guide / Customizing installation images / Cloning disk images
Applies to SUSE Linux Enterprise Server 15 SP4

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

Warning
Warning: Important configuration loss

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

  1. Use zypper to install clone-master-clean-up:

    > sudo zypper install clone-master-clean-up
  2. Configure the behavior of clone-master-clean-up by editing /etc/sysconfig/clone-master-clean-up. This configuration file defines whether users with a UID larger than 1000, the /etc/sudoers file, software repositories for package installation, and Btrfs snapshots should be removed.

  3. Remove existing configuration and unique identifiers by running the script:

    > sudo clone-master-clean-up