Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 15 SP1

13 Cloning Disk Images Edit source

This chapter describes how to use cloned images for installing SUSE Linux Enterprise Server. This is mostly used in virtualized environments.

13.1 Overview Edit source

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, see https://doc.opensuse.org/projects/kiwi/doc/.

To clone disks of machines, refer to the documentation of your virtualization environment.

13.2 Cleaning Up Unique System Identifiers Edit source

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.

The clone-master-clean-up command for example 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:

    tux > 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, Zypper repositories and Btrfs snapshots should be removed.

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

    tux > sudo clone-master-clean-up
Print this page