Jan. 2, 2023

Using libvirt with qemu encrypted qcow2 images

#libvirt

Disk image backing chain notation

A simple disk image chain. (This can be created live using QMP blockdev-snapshot-sync, or offline via qemu-img):

                        (Live QEMU)
                                |
                                |
                                V
        [A] < ---------   [B]
(backing file)       (overlay)

 

 

The arrow can be read as: Image [A] is the backing file of disk image [B]. And live QEMU is currently writing to image [B], consequently, it is also referred to as the “active layer”.

There are two kinds of terminology that are common when referring to files in a disk image backing chain:

  1. Directional: ‘base’ and ‘top’. Given the simple disk image chain above, image [A] can be referred to as ‘base’, and image [B] as ‘top’. (This terminology can be seen in the QAPI schema file, block-core.json.)
  2. Relational: ‘backing file’ and ‘overlay’. Again, taking the same simple disk image chain from the above, disk image [A] is referred to as the backing file, and image [B] as overlay.