Delta Images

If you have very large images that you need to synchronize to the branch server, you can use delta images to save network bandwidth.

A delta image contains only the differences between two regular images. If there are only a few changes between two images, the delta image can be very small. Synchronizing a delta image to the branch consumes less network bandwidth but it requires some extra hardware resources on the branch server to rebuild the installable image.

1. Building Delta Images

The retail_create_delta tool creates a delta image on the Uyuni server. The tool uses xdelta3 internally.

Use the name and the version strings of the target and the source image as parameters to the command. The format of the parameters must be <NAME>-<VERSION> and they must correspond to the image names and versions available in the pillar. For example, if the pillar contains:

images:
  POS_Image_JeOS6:
    6.0.0:
      ...
    6.0.1:
      ...
  POS_Image_Graphical6:
    6.0.0:
      ...

Then the retail_create_delta command is:

retail_create_delta POS_Image_JeOS6-6.0.1 POS_Image_JeOS6-6.0.0

This command will generate the delta image between version 6.0.0 and version 6.0.1. The resulting delta file is saved in /srv/www/os-images and the corresponding pillar in the database.

2. Tuning Delta Generation

Performance tuning is possible with the -B <VALUE> option, which is passed to xdelta3. With higher values you achieve smaller deltas at the cost of higher memory requirements. For more information, see the xdelta3 documentation (man xdelta3).

3. Image Synchronizing to the Branch Server

When an image is synchronized to the branch server, the image-sync-formula first checks whether the source image is available on the branch server. Only if the source image is available, the delta will be downloaded to save network bandwidth.